RevisionLog14000台

r14997 | regis@google.com | 2012-11-16 10:31:15 +0900 (金, 16 11月 2012) | 4 lines
Make creation of list literal more resilient to changes in the underlying
dart implementation of List in the core library.
Do the same for map literal creation.
ListInterfaceから、ArrayTypeに変わった。
基本的にはvm内部でlistではなく、arrayとして扱うためのリファクタリング。listはcore library側。
vmはlistをimplしているわけではないので。
parser周りのfactoryの修正も多い。

r14993 | hausner@google.com | 2012-11-16 09:57:09 +0900 (金, 16 11月 2012) | 7 lines
Disallow const native factories
We removed the only user of const native factory methods, so remove the hack in the VM.
Issue 6662.
parserの修正
const factoryがruntime error
constructor or factoryに制御を分けていたのを、
FactoryOrConstructorという一括りにして、整理

r14989 | asiva@google.com | 2012-11-16 09:13:18 +0900 (金, 16 11月 2012) | 3 lines
Revert OneByteString back to ISO Latin-1 instead of ASCII
as webkit supports ISO Latin-1 and UTF-16 encodings for strings.
Ascii -> Latine1 に伴い、<= 0x7F -> <= FF
decodeが大きく変わった。 DecodeToLatin1()
MessageのOneByteStringやStringも、Latine1に置き換えられた。

r14978 | asiva@google.com | 2012-11-16 06:37:26 +0900 (金, 16 11月 2012) | 3 lines
  • Add functionality to morph a string into an external string
  • Add Dart API call Dart_MakeExternalString
dart_api_implに追加
Dart_StringStorageSize()
Dart_MakeExternalString()
ExternalOneByteString::Newの、UnusedSpaceに関する処理をリファクタリング。
併せてMakeExternalString()を作成し、UnusedSpaceの処理を挿入。

MakeUnusedSpaceTraversable()というのを使うと、
GC中にTraverse可能なunused spaceを生成。これはArrayかInstanceとして作成可能。
original_size - used_sizeが、unusedSpaceになる。
unusedSpaceのサイズによって、ArrayかInstanceとして作成するか決まる。

MakeUnusedSpaceTraversable()は、MakeExternalStringか、ExternalOneByteString::Newから呼ばれる。
ExternalStringのunusedspaceは、GC中にtraverseできると?何かに活用するんだっけ?

MakeExternal()は、used_sizeはInstanceSize(), original_sizeは、str_lengthになる。
その差分をすべてunusedspaceとする。
普通のStringはstrlenのサイズだけメモリが必要だったが、
ExternlStringの場合、InstanceSize()のtopだけのメモリのみ確保し。
Stringのbody部分は、memmoveで、void*arrayにコピーしてしまう。
top以外の残った領域をunusedSpaceとする。
kOneByteStringCidとkTwoByteStringCidでのみ使用可能。

Externalな領域は、AddFinalizer()で、FinalizablePersistentHandle* weak_refから参照される。
externalな領域は、GCのpeerで管理する。
peerはGCで特別に管理する集合だった気がする。

r14951 | ager@google.com | 2012-11-15 20:03:02 +0900 (木, 15 11月 2012) | 10 lines
Don't copy Int8Arrays when passing them in as lists of bytes and don't
call from C to Dart to get the values either.
Just copying the values over as is will behave the same as it does
now and will be a lot faster.
R=sgjesse@google.com
Int8ArrayとExternalInt8Arrayは、Uint8と同様にRangeCheckしてcopyする。

r14948 | iposva@google.com | 2012-11-15 18:15:14 +0900 (木, 15 11月 2012) | 2 lines
  • Make sure to add predefined symbols into the current symbol table after growth.
副作用を考慮してループの中にいれましたということ?

r14943 | sgjesse@google.com | 2012-11-15 17:16:27 +0900 (木, 15 11月 2012) | 7 lines
Address comments to r14887
TBR=iposva@google.com
リファクタリングかな。

r14939 | asiva@google.com | 2012-11-15 10:51:50 +0900 (木, 15 11月 2012) | 2 lines
Fix build failure on linux.
r14937 NativeArgAt()のミス。

r14938 | srdjan@google.com | 2012-11-15 10:36:04 +0900 (木, 15 11月 2012) | 2 lines
Address Florian's comments: use restricted lazy deoptimization, fix typo.
r14934のDeoptimizeIfOwner()を使いましょう。

r14937 | hausner@google.com | 2012-11-15 10:14:01 +0900 (木, 15 11月 2012) | 7 lines
Fix native argument handling
Native functions need to fetch arguments differently if they are called through a closure.
fixes issue 6696.
closure内からのnative argumentに対する扱い
14698からみかな?
closureの場合、native argに普通の方法ではアクセスできない。
おまけにhidden args=1が存在するらしい。
native argsは、 closure functionではなく、contextが管理しているらしい。

r14936 | asiva@google.com | 2012-11-15 10:14:07 +0900 (木, 15 11月 2012) | 3 lines
Do not try to write ContextScope into a snapshot.
(partially addresses issue 6358).
ContextScopeのSnapshot Read/Writeがなくなった。

r14935 | cshapiro@google.com | 2012-11-15 10:05:48 +0900 (木, 15 11月 2012) | 3 lines
Fail new space promotions only when old space is truly exhausted.
TryAllocate()に、PageSpace::GrowthPolicy growth_policy = PageSpace::kControlGrowth
を追加。
new space promotionに失敗した場合、PageSpace::kForceGrowthをつけて、再度チャレンジ

r14934 | srdjan@google.com | 2012-11-15 09:41:53 +0900 (木, 15 11月 2012) | 2 lines
Upon script loading deoptimize only functions whose owener has been subclassed,
as that is the only CHA optimizations being applied to the code at the moment.
DeoptimizeIfOwner()を追加
リファクタリングして、DeoptimizeAt()を追加

scriptのowenerはどういう条件下だろうか。
loadされたscriptおよびそのsubclass群を呼び出しているfunctionのことかな。
全部ではなく、対象を絞ってdeoptimizeすると。

ownerは、classloadingの直後であるclass_finalizerで収集する。

r14926 | asiva@google.com | 2012-11-15 08:14:41 +0900 (木, 15 11月 2012) | 5 lines
Throw illegal argument exception when
  • objects which extend NativeWrapper are passed in isolate messages
  • closure objects are passed in isolate messages
(issues 6108, 6312)
SnapshotWriterで失敗するケースを追加
Writerの引数が、IsSignatureClass()か、IsNativeArgumentの場合、
ArgumentExceptionを投げる。投げるといっても、setjump,longjumpだが。

r14916 | regis@google.com | 2012-11-15 04:56:39 +0900 (木, 15 11月 2012) | 2 lines
Fix result type checking of redirecting factory in checked mode (issue 6596).
tests/language/factory_redirection_test.dartを参照するとわかりやすいかも。
parserの修正。
redirect_functionだった場合、かつSubTypeをもつ場合、エラーらしい。

r14905 | regis@google.com | 2012-11-15 02:33:50 +0900 (木, 15 11月 2012) | 2 lines
Never compile a redirecting factory (issue 6697).
IsRedirectingFactory()はCompileFunction()しないらしい。どういうこった。

r14887 | sgjesse@google.com | 2012-11-14 22:01:57 +0900 (水, 14 11月 2012) | 15 lines
Add support for non ASCII strings when communicating with native ports.
The string representation in a Dart_CObject strructure is now UTF8.
All strings read are now converted to UTF8 from either ASCII or UTF16 serialization.
All strings posted should be valid UTF8 and are
serialized as either ASCII or UTF16 depending on the content.
Proper andling of surrogate pairs is missing, but will be added when
R=ager@google.com, erikcorry@google.com, asiva@google.com
PostCObject()でApiMessageWriterでSerializationに失敗した場合、return false
kTwoByteStringCidの場合、
CObjectのreaderでUtf8::Encode, CObjectのWriterでDecodeToUTF16

r14873 | regis@google.com | 2012-11-14 13:28:02 +0900 (水, 14 11月 2012) | 3 lines
Remove private class helping the parser to construct literal lists and maps.
Patch List and Map (implementation) classes with literal factories.
List._fromLiteral, _HashMapImpl, Map._fromLiteral
がprivateになって、Recognizerで再定義された。

r14872 | fschneider@google.com | 2012-11-14 08:45:23 +0900 (水, 14 11月 2012) | 6 lines
Enable inlining of functions containing instance-of.
The corresponding issues have been fixed and all tests pass now.
BUG=dart:5216,dart:5217
どういうことかわからないけど、inliningのbailoutが1個外れた。
他でissueの原因が解決したからなのか。

r14871 | srdjan@google.com | 2012-11-14 08:31:07 +0900 (水, 14 11月 2012) | 2 lines
Move lazy deoptimization of all optimized code from top level parsing to end of class finalization
(after installing new classes, and --use_cha, we need to invalidate some optimzied code)
RemoveOptimizedCode()が、parserからclass_finalizerに移動した。
FinalizePendingClasses()の中で、use_cha=trueの場合、RemoveOptimizedCode()が走る。
タイミングが変わっただけかな。

r14870 | vegorov@google.com | 2012-11-14 08:21:02 +0900 (水, 14 11月 2012) | 6 lines
Count per check hits in ICData.
R=srdjan@google.com
Objectクラスに、Get/SetCountAtっていうメンバを追加した。
emit時にcount_offsetをインクリメントする処理を追加して、
ICDataのcheckの回数をカウント。
最適化で使うわけではないけど、il_printerがデバッグ情報として回数を出力してくれる。
この後どうなっていくんでしょうかね。 楽しみです。

r14866 | regis@google.com | 2012-11-14 06:05:55 +0900 (水, 14 11月 2012) | 2 lines
Create symbols for string constants.
FunctionResult, FactoryResultをSymbolに追加

r14864 | fschneider@google.com | 2012-11-14 05:00:47 +0900 (水, 14 11月 2012) | 6 lines
Improve SHR by using range information for the shift count.
Avoid emitting unnecessary range checks for the shift count
if the value is known to be positive and/or less than the max shift count.
CanDeoptimize() kSHRの場合、Rangeが0~kPlusInfinityの間に収まるなら、Deoptimize不要。
EmitBinarySmiInstrでは、
leftがRegister値の際に、CanDeoptimize()をチェックし、
rightが0以下の場合、deoptimizeするコードを生成
rightがcountlimitに収まるかもチェックする。
countlimitに収まらない場合、rightにcountlimitをsetしているけど、deoptimizeでなく?

r14862 | regis@google.com | 2012-11-14 04:02:08 +0900 (水, 14 11月 2012) | 2 lines
Check result type of redirecting factory in checked mode.
parserでは、RedirectingFactoryに対して、
check_result_typeオプションが有効な場合、 AssignableNodeを生成。
flow_graph_builderで、AssignableNodeをCanSkipTypeCheck()で確認

RedirectingFactoryがMalformedだった場合、parserでのエラーチェック
Constructorの場合はRuntimeのエラーチェックを挿入する。

r14860 | srdjan@google.com | 2012-11-14 03:34:05 +0900 (水, 14 11月 2012) | 4 lines
In optimized code use IC calls for instance calls that have no IC data instead of deoptimizing.
The optimized IC call increments usage counter and reoptimizes optimized function
if the threshold is met.
Recognize closure calls and mark them in ICData.
Closure calls do not populate ICData,
i.e., number of checks is always 0 (unless mixed closure calls with regular instance calls).
Therefore closure IC calls do not count for reoptimization.
オプション trace_optimized_ic_calls=false
オプション reoptimization_counter_threshold=2000


r14838 | ajohnsen@google.com | 2012-11-13 19:41:37 +0900 (火, 13 11月 2012) | 8 lines
Move JSSyntaxRegExp to core as a private member.
This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.
_JSSyntaxRegExpがPrivateのsyntaxになって、CoreImplからruntime/libに移動。
coreimplはすべてprivateになったので、LoadCoreImplScriptや、corelib_impl_source/patchなどの、
Library::CoreImplLibrary()をVM側からScriptとして呼び出す処理も、併せて削除。
Bootstrapや、VM側が上記の参照をHandleしておく変数等も削除。

r14828 | hausner@google.com | 2012-11-13 10:06:48 +0900 (火, 13 11月 2012) | 2 lines
Enforce proper library/import syntax
parserの修正
いろいろとエラー制御が増えた。

r14827 | vegorov@google.com | 2012-11-13 09:50:57 +0900 (火, 13 11月 2012) | 8 lines
Eradicate CallSiteInliner::next_ssa_temp_index_.
It should always be equal to the max SSA temp index stored on the caller graph itself.
Thus it is redundant and dangerous to store it in two places.
R=kmillikin@google.com
next_ssa_temp_index_から、max_virtual_register_number()で逐一再計算するように変更
使いまわすのはよくない。

r14825 | srdjan@google.com | 2012-11-13 09:43:17 +0900 (火, 13 11月 2012) | 2 lines
Do not add InstantiatedTypeArgument entries into cache as they cannot be canonicalized.
Limit the maximum subtype cache size,
so that it does not become brobdingnagian and thus slows the GC.
オプション max_subtype_cache_entries=100
でcacheの上限を設けた。

r14823 | hausner@google.com | 2012-11-13 08:51:51 +0900 (火, 13 11月 2012) | 2 lines
Fix debugger test
testコードのsymbolを変更

r14822 | iposva@google.com | 2012-11-13 08:26:38 +0900 (火, 13 11月 2012) | 2 lines
  • Fix x64 build.
friend追加

r14821 | iposva@google.com | 2012-11-13 08:21:04 +0900 (火, 13 11月 2012) | 5 lines
  • Do not mix scalar values and object fields in RawInstance to simplify the traversal for GC.
Classes with native fields have a hidden reference to a typed array containing the native fields.
cls.native_fieldを参照しなくなり、native_fieldの初期かが
GenerateAllocationStubForClass()からなくなった。
代わりに、object.h::setNativeField()の初回に領域確保を行う。

objectがnative_fieldへの参照をもつ。
普通は、raw_objectに実データを持たせるものだが、、


r14816 | hausner@google.com | 2012-11-13 07:57:39 +0900 (火, 13 11月 2012) | 2 lines
More function literal changes in tests.
昔は空のfunctionが、function() {}
今は、() {}

r14814 | fschneider@google.com | 2012-11-13 07:44:34 +0900 (火, 13 11月 2012) | 12 lines
Restrict immediate operands to smi where only smis are supported.
Re-enable redundant phi elimination.
Add x64 codegen templates and assembler instructions for immediate operands.
Fix x64 assembler for imull when using r8-r15.
Add x64 instruction for imulq(reg, imm).
Fix x64 disassembler printing of immediates.
remove_redundant_phis=trueにオプション変更
特定の条件下で、RegisterOrConstantからRegisterOrSmiConstantに置き換え
RelationalOpやBinarySmiInstrにおいて、参照のみされるOperand(1)は、
Instrの副作用の影響を受けないので、OrSmiConstantのままであると。

r14805 | hausner@google.com | 2012-11-13 04:55:11 +0900 (火, 13 11月 2012) | 8 lines
Remove named function literals from library and tests
Start eliminating old-style function literals, i.e. remove
return type and function names.
Enforcing new style function literal syntax can be turned
on with the vm flag --strict_function_literals.
オプション strict_function_literals=false
parserの修正
関数の下記リテラルが使用不可になるらしい。
IDENT + LPARENTのパターン。_(var x)
VOID + literalのパターン。 void xx(var x)

r14802 | asiva@google.com | 2012-11-13 04:02:44 +0900 (火, 13 11月 2012) | 2 lines
Fix for issue 6623 - Canonicalize implicit static closure objects.
IsImplicitStaticClosureFunction()だった場合、
ReturnDefinition(new ConstantInstr(closure));
union構造に置き換え、closure_を追加
union {
RawInstance* closure_;  // Closure object for static implicit closures.
 RawCode* closure_allocation_stub_;  // Stub code for allocation of closures.
};


r14794 | floitsch@google.com | 2012-11-13 02:19:58 +0900 (火, 13 11月 2012) | 7 lines
a === b -> identical(a, b)
Replace === null with == null.
testコードのみ書き換え。
=== -> ==
=== -> identical()

r14779 | lrn@google.com | 2012-11-12 17:16:59 +0900 (月, 12 11月 2012) | 5 lines
Convert String to a class.
Remove the StringImplementation class.
StringInterfaceからStringTypeに置き換えただけ

r14769 | regis@google.com | 2012-11-10 08:51:06 +0900 (土, 10 11月 2012) | 6 lines
Fix result type checking of factory constructors of generic classes in VM.
Add a language test.
Fix some language tests.
Fix runtime library.
Note: This does not yet fix result checking of redirecting factories.
Factoryである場合の処理を、class_finalizerに追加
Factoryのresult_typeを取得する。

r14756 | srdjan@google.com | 2012-11-10 05:55:31 +0900 (土, 10 11月 2012) | 3 lines
Remove unused/not working function tracing flag and functionality.
Other small fixes, use stub to call optimization of a function (in preparation for reoptimization).
trace_functionsオプションを削除
ReturnInstr::EmitNativeCode
の中の、kOptimizeInvokedFunctionRuntimeEntryの呼び出しを、
StubCode::OptimizeFunctionLabelとして関数化

r14755 | fschneider@google.com | 2012-11-10 04:54:55 +0900 (土, 10 11月 2012) | 6 lines
Reland: Improve smi shift operations and avoid repeated deoptimizations.
This CL includes a bug fix where a NULL check of the pc was missing.
Also change the dart2js test status of arithmetic_test from Skip to Fail.
deopt_reason set/getできるようになった。 last_deoptのみ履歴として残す。
deoptの履歴を参照して、最適化するかしないか決める。
実コードでは、DeoptBinarySmiOp(overflowした)の場合、kMintCid、そうでなければkSmiCid

Shift値が定数だった場合、BinarySmiにSHLの特殊化を追加
kSHL(left, rigth)
mov temp, left
shll left
sarl left
cmpl left, tmp <-- 元にもどして等しくないならアウト
noeqならoverflowとしてdeopt
shll left

そうでない場合、BinarySmiのSHL特殊化を修正
shift数をuntagした後は、上記と共通。

deopt_reasonを大幅に整理、不要だったものを削除。
このdeoptの履歴はlastだけでなく、bitにして集合を管理したほうがいいような。

r14752 | kmillikin@google.com | 2012-11-10 04:42:01 +0900 (土, 10 11月 2012) | 8 lines
Fix Code::ToCString.
It was printing the entry address in decimal and only the low 32 bits on x64.
R=vegorov@google.com
0x%d --> %p出力に変更

r14718 | srdjan@google.com | 2012-11-09 09:58:21 +0900 (金, 09 11月 2012) | 2 lines
Make sure that ParsedFunction holds onto zone handles.
HandleからZoneHandleへの切り替え
ParsedFunctionが、function.raw()をZoneHandleで管理する。

r14716 | hausner@google.com | 2012-11-09 09:19:43 +0900 (金, 09 11月 2012) | 2 lines
Implement const expressions for local variables
astにEvalConstExpr()が追加 NULL or compile-time const value.
LocalVariable関連のファイルを修正し、VariableにConstのフラグ設定を行う。
RawBool* is_const; <-- add
union {
RawAbstractType* type;
 RawInstance* value;  // iff is_const is true   <-- add
};
コンパイル時にEvalするような処理は入ってないけど、どこかでやっているのだろうか。
Constフラグの設定は行っているが、フラグを参照してどうこうする処理ははいっていない。


r14705 | vegorov@google.com | 2012-11-09 04:13:57 +0900 (金, 09 11月 2012) | 8 lines
Use structural loop info computed by register allocator to mark loop phis.
Currently it disagrees with loop information computed
in other parts of optimization pipeline that do not require loops to be properly nested.
R=fschneider@google.com
flow_graph_allocator::ConnectIncomingPhiMovesのリファクタリング
loop_headerのみつけかたを若干書き換えたくらいかな。

r14701 | gram@google.com | 2012-11-09 03:41:58 +0900 (金, 09 11月 2012) | 2 lines
Fix library syntax
importの構文は、以下も使えるように最近対応された
import 'dart:isolate';

r14698 | regis@google.com | 2012-11-09 03:28:07 +0900 (金, 09 11月 2012) | 4 lines
Pass closure object as first implicit argument to closure functions.
Remove code passing captured receiver to native instance closures; instead,
access captured receiver in context, as non-native functions do.
修正量がでかいように見えて、そうでもない。 コード量が減る方向にリファクタリング。
native_argumentsに若干の変更があるかな。
native_closure関係の修正。native_closureを特別扱いせず、普通のclosureと同様に扱うコードに置き換え。
is_native_instance_closure()を削除し、native_instanceだからarg+1するような処理を削除。

ia32ではいか。
old
Input parameters:
ESP : points to return address.
ESP + 4 : address of return value.
EAX : address of first argument in argument array.
EAX - 4*EDX + 4 : address of last argument in argument array.
ECX : address of the native function to call.
EDX : number of arguments to the call.
void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler)

new
Input parameters:
ESP : points to return address.
ESP + 4 : address of return value.
EAX : address of first argument in argument array.
ECX : address of the native function to call.
argc_tag including number of arguments and function kind.

r14695 | iposva@google.com | 2012-11-09 03:07:54 +0900 (金, 09 11月 2012) | 5 lines
Fix bug 6586:
  • Attempt to run the Monitor thread_test multiple times before failing
due to its potential to failure due to timing.
  • Use named constants when converting millis to seconds and nanos.
Review URL: https://codereview.chromium.org//11361157
thread.test.ccの修正

r14673 | vegorov@google.com | 2012-11-08 11:23:41 +0900 (木, 08 11月 2012) | 10 lines
Try allocating loop phi into a register even if phi has only unconstrained uses
but there are cheap eviction candidates:
values that come into the loop and have only unconstrained uses in it.
When spilling a value inside the loop
that has only unconstrained uses in this loop move spilling point outside of the loop.
This tweaks allow to minimize amount of memory moves on loop back edges.
R=fschneider@google.com
ループ中で使わない変数を、ループの外にspillする処理を追加。

r14668 | srdjan@google.com | 2012-11-08 09:19:53 +0900 (木, 08 11月 2012) | 1 line
Add flag --remove-redundant-phis, default to false until incorrect code generation is fixed.
This CL makes all test pass with --optimization-counter-threshold=5 .
remove_redundant_phis=falseオプションを追加

r14611 | srdjan@google.com | 2012-11-07 10:34:50 +0900 (水, 07 11月 2012) | 2 lines
Fixed disabling inlining of static calls that were not executed.
r14605 | srdjan@google.com | 2012-11-07 08:47:19 +0900 (水, 07 11月 2012) | 2 lines
Do not inline static calls that have not been executed in unoptimized code:
the inlined function does not have type feedback
that takes that call's arguments into account.
As a side effect, it fixes a crash in smi-equality.
14611で修正が入っているので、両方合わせて
ExtractUncalledStaticCallDeoptIds()で、PcDescriptorsからStaticFunctionを収集し、
uncalled_static_static_call_deopt_ids_のArrayに設定。FlowGraphInliner生成のたびに収集する。
Inliningの候補を走査し、VisitStaticCallした際に、上記Arrayに含まれていたら、Inliningしない。

r14600 | hausner@google.com | 2012-11-07 07:51:01 +0900 (水, 07 11月 2012) | 2 lines
Make sure setter does not conflict with method
parser kSetterFunctionか確認する条件を追加

r14589 | asiva@google.com | 2012-11-07 04:11:07 +0900 (水, 07 11月 2012) | 2 lines
Avoid duplicate null checks when calling SetRaw from InitializeHandle
obj->SetRaw()をinitializeHandle(obj, raw_ptr)に置き換え

r14588 | asiva@google.com | 2012-11-07 04:07:43 +0900 (水, 07 11月 2012) | 2 lines
Fix length computation in Dart_StringToUTF8.
エラー追加

r14583 | hausner@google.com | 2012-11-07 02:54:27 +0900 (水, 07 11月 2012) | 8 lines
Fix various inheritance bugs
Fields can be overridden by subclasses
A setter does not conflict with a method
Eliminate outdated tests
Fixes issue 6482
parser周り全然読んでないから、この機会にでも。。
LoopupFunctionとか、LookupFieldとか
func ^= functions_.At(i)
test_name = func.name() とか不明すぎる。

r14553 | asiva@google.com | 2012-11-06 11:58:00 +0900 (火, 06 11月 2012) | 2 lines
Fix some warnings generated when -Wconversion-null is used.
spawn_data_(NULL) -> spawn_data_(0)

r14549 | asiva@google.com | 2012-11-06 09:56:53 +0900 (火, 06 11月 2012) | 2 lines
Added a unit test case for issue 6448
6448???, maybe 6358

r14548 | asiva@google.com | 2012-11-06 09:56:41 +0900 (火, 06 11月 2012) | 2 lines
Fix compiler warning.

r14547 | tball@google.com | 2012-11-06 08:51:40 +0900 (火, 06 11月 2012) | 5 lines
Made string sub-classes friends of Object, to give them access to Object::Allocate
when compiling with clang.
Objectクラスのfriendに下記の4クラスを追加。のみ。clangのコンパイル対策?

r14545 | tball@google.com | 2012-11-06 07:22:19 +0900 (火, 06 11月 2012) | 10 lines
Merged String subclasses into String.
Merged String subclasses (OneByteString, etc.) into String,
keeping their raw types.
This allows String handles to continue to point
to a String after its raw type is changed, such as to make its data external.
OneByteString, TwoByteString, ExternalOneByteString, ExternalTwoByteStringが、
Stringの継承ではなく、AllStaticの継承に変更。 Stringのfriendに。
Stringから継承していたメソッドやI/Fは別途実装。
内部のデータの持ち方は変更なし。
NewStringClass()というファクトリを作って、全部String型でHandleするように変更。

r14544 | regis@google.com | 2012-11-06 06:00:12 +0900 (火, 06 11月 2012) | 4 lines
Do not copy type parameter bound from declaration to reference, since we are
not able to properly finalize it.
Revisit later. This fixes issue 6488. Siva will add a test.
TypeParameterのboundを再解析する。

r14540 | srdjan@google.com | 2012-11-06 02:07:06 +0900 (火, 06 11月 2012) | 2 lines
Remove special meaning when usage counter reaches the threshold.
optimization_counter_threshold周りでemitされるコードを修正
冗長なコードを整理したらしい。

r14500 | hausner@google.com | 2012-11-03 05:30:08 +0900 (土, 03 11月 2012) | 4 lines
Make library, import, export, part pseudo-keywords
Resubmit cl 14446 after Ivan's keyword table fix.
KEYWORD_LISTを修正。
library, import, export, partのtoken化
taken.hには、operatorの優先順位が定義されている。

r14499 | srdjan@google.com | 2012-11-03 05:21:33 +0900 (土, 03 11月 2012) | 2 lines
For megamorphic calls (IC calls in optimized code),
use a stub without attempting to count usage of function.
最適化時にICを生成する際に、MegamorphicCallEntryPoint()を使う処理を追加
GenerateUsageCounterIncrement()を作成、既存処理から関数を抽出。
ICにはusage_counter_offset()がフィールドとして埋まっていて、
ICが呼ばれる度に、そのカウンターをインクリメントする。
この関数はカウンターをインクリメントするのみ。他の処理は行わない。

r14486 | srdjan@google.com | 2012-11-03 01:35:05 +0900 (土, 03 11月 2012) | 2 lines
Various little cleanups to avoid excessive allocation of handles.
forの終値をループの外に移動。
Handleの畳み込み

r14463 | zerny@google.com | 2012-11-02 21:26:07 +0900 (金, 02 11月 2012) | 8 lines
More inlining flags and tuned heuristics.
The heuristics should be examined further,
but these maintain about the same runtime for the benchmarks
while decreasing compile time for dart2js.
R=kmillikin@google.com
builderの関数にloop_depth()を引数に追加
JoinEntryとBlockEntryInstrとTargetEntryInstrにloop_depthを設定する

inlining向けにオプションを追加
以下の5オプションは、ShouldWeInline()で参照。
DEFINE_FLAG(int, inlining_size_threshold, 20,
"Always inline functions that have threshold or fewer instructions");
DEFINE_FLAG(int, inlining_in_loop_size_threshold, 80,
"Inline functions in loops that have threshold or fewer instructions");
DEFINE_FLAG(int, inlining_callee_call_sites_threshold, 1,
"Always inline functions containing threshold or fewer calls.");
DEFINE_FLAG(int, inlining_constant_arguments_count, 1,
"Inline function calls with sufficient constant arguments "
 "and up to the increased threshold on instructions");
DEFINE_FLAG(int, inlining_constant_arguments_size_threshold, 60,
"Inline function calls with sufficient constant arguments "
 "and up to the increased threshold on instructions");

Inlining heuristics based on Cooper et al. 2008.
もしかして、これ?
An adaptive strategy for inline substitution
引数にConstantがある場合、Constant Propagationに期待出きるので、
積極的にinliningすると。
loop_depthは、loop_depth > 0かつinlining_in_loop_size_thresholdがtrueでないと、
ShouldWeInlineがtrueにならない。
loop bufferの範囲内で、inliningしたいってところか。


r14453 | iposva@google.com | 2012-11-02 16:29:12 +0900 (金, 02 11月 2012) | 3 lines
  • Prepopulate the keyword symbol table otherwise we can end up
with empty spots when reading from a snapshot.
scanner/parserの変更

r14444 | srdjan@google.com | 2012-11-02 08:25:26 +0900 (金, 02 11月 2012) | 2 lines
Add is_intrinsic and is_not_intrinsic bits to prevent repeated tests on the same function
(inlining, recompilations). The bist are set lazily, initially both are false.
IntrinsicKindを追加。kUnknownIntrinsic, kIsIntrinsic, kIsNotIntrinsic
主にリファクタリング

r14441 | fschneider@google.com | 2012-11-02 07:47:41 +0900 (金, 02 11月 2012) | 12 lines
Inline native String.charCodeAt in optimized code and fix a bounds-check bug.
Introduce a new IL instruction that does charCodeAt from
1- and 2-byte character strings. The existing CheckArrayBound
instructions is extended to be used for string bounds checking.

Also fix a bug with a missing compile-time bounds-check on constant arrays.

TEST=tests/language/optimized_string_charcodeat.dart,
tests/language/optimized_constant_array_string_access.dart
charCodeAtのintrinsicsを追加
StringCharCodeAtInstrクラス
flow_graph_optimizerに特殊化処理追加
条件をみて、CheckArrayBoundInstrも畳み込むらしい
ia32のEmitterは、
kOneByteStringCidの場合、
SmiUntag(index), movzxb, SmiTag(index), SmiTag(result)
kTwoByteStringCidの場合、SmiUntag(index)/Tag(index)が畳み込めるので、movzxb, SmiTag(result)

r14434 | srdjan@google.com | 2012-11-02 06:06:36 +0900 (金, 02 11月 2012) | 2 lines
Do not recompute unary_checks repeatedly.
Add special (and quicker) way to check for method overrides using CHA.
cha.cc HasOverride()を追加 呼び出し元をリファクタリング
direct_subclass.LookupDynamicFunction()で探す。もしあればtrue
const ICData& unary_ic_dataを引数で渡すようにして再計算しないように。
最近この手の修正が多いですね。

r14426 | vegorov@google.com | 2012-11-02 03:56:39 +0900 (金, 02 11月 2012) | 8 lines
Improve RangeBoundary::LowerBound/UpperBound.
They should not just return MinSmi/MaxSmi when symbol's range is not available.
Instead they should take offset into account.
R=fschneider@google.com
ただMaxSmi()やMinSmi()を返さず、(Symbol +- offset) をかえす。

r14422 | srdjan@google.com | 2012-11-02 03:10:30 +0900 (金, 02 11月 2012) | 2 lines
Fix issue 6288, move DeoptimizeAll to top level parsing.
Allow optimizing compiler to optimize even when ooptimzied code is active.
LoadScriptの際に、use_cha==trueでRemoveOptimizedCode()しなくなった。
OptimizeとDeoptimizeの制御が複雑になってきた。。


r14420 | asiva@google.com | 2012-11-02 02:58:58 +0900 (金, 02 11月 2012) | 2 lines
Remove some unnecessary class handle creations.
const Class&のHandleから、intptr_t class_idにいくつか変更
実行時の一時的なメモリ増加がほんの少し減少するのかな?

r14405 | lrn@google.com | 2012-11-01 22:46:30 +0900 (木, 01 11月 2012) | 5 lines
Renaming IndexOutOfRangeException to RangeError.
It now extends ArgumentError.
Exceptionの名称が変更されたのみ。

r14381 | sgjesse@google.com | 2012-11-01 17:09:30 +0900 (木, 01 11月 2012) | 7 lines
Fix broken VM build caused by 14380
TBR=csaphiro@google.com
GetData()とGetPeer()を
ExternalInt8Arrayクラスに追加

r14380 | sgjesse@google.com | 2012-11-01 16:53:33 +0900 (木, 01 11月 2012) | 15 lines
New APIs for external byte arrays
The following APIs have been added:
Dart_IsExternalByteArray: Check whether an object is an external byte array.
Dart_ExternalByteArrayGetData: Return the pointer to the external data
hosted by the external byte array.
R=cshapiro@google.com
StringAPI周りの追加修正。

r14381 | sgjesse@google.com | 2012-11-01 17:09:30 +0900 (木, 01 11月 2012) | 7 lines
Fix broken VM build caused by 14380
TBR=csaphiro@google.com
GetData()とGetPeer()を
ExternalInt8Arrayクラスに追加

r14380 | sgjesse@google.com | 2012-11-01 16:53:33 +0900 (木, 01 11月 2012) | 15 lines
New APIs for external byte arrays
The following APIs have been added:
Dart_IsExternalByteArray: Check whether an object is an external byte array.
Dart_ExternalByteArrayGetData: Return the pointer to the external data
hosted by the external byte array.
R=cshapiro@google.com
StringAPI周りの追加修正。

r14377 | srdjan@google.com | 2012-11-01 08:17:20 +0900 (木, 01 11月 2012) | 2 lines
Any instance call with too many checks is left to be megamorphic.
This helps with, e.g., LoadField instructions with large number of checks and frequent deoptimization.
Deoptimization improves on dart2js/swarm:
total number of deoptimization 956 -> 753; number of methods becoming unoptimizable 101 -> 52.
Megamorphicの際には、制御を変更してcheckが生成されないようにした。
deoptの個数は減るらしい。

r14367 | srdjan@google.com | 2012-11-01 05:07:31 +0900 (木, 01 11月 2012) | 2 lines
Add flag --always_cleared_ic_data,
which forces a cleared ICData to be emitted with each IC call
(instead of propagating the ICData from unoptimized to optimized code).
This addresses Kevin's concern that propagating the ICData may hurt performance
when inlining methods as the IC calls of inlined methods may not need all classes as the unoptimized code.
Currently running with cleared ICData slows dart2js by > 2%,
probably because the ICData has to be repopulated by optimized code through calls to runtime.
Adding the flag for experimenting as we work on inlining strategies and megamorphic calls.
オプション追加--propagate-ic-data=true
非常に興味深い修正 inlining strategies
修正前は、unoptimizeのときだけ生成。
オプションがtrueの場合、ICをEmitするたびにクリア。
オプションをfalseにすると、修正前と挙動は同じ。

r14366 | hausner@google.com | 2012-11-01 04:43:44 +0900 (木, 01 11月 2012) | 4 lines
Prevent mutation of final variables
Fixes issue 4328
finalのコンパイル時エラー対応

r14362 | regis@google.com | 2012-11-01 03:13:12 +0900 (木, 01 11月 2012) | 4 lines
Remove references to ObjectNotClosureException and ClosureArgumentMismatchException
from the VM (issue 6124).
These are replaced with NoSuchMethodError for now (work in progress).
code_generatorを修正して、Runtimeのエラーを作成している。
作る際の参考になるかも。
最終的には、ThrowByType()で投げる。
exceptions.ccから、上記2つのsymbolを削除
symbolsにCall, "call"を追加

r14357 | asiva@google.com | 2012-11-01 02:56:46 +0900 (木, 01 11月 2012) | 23 lines
  • Represent strings internally in UTF-16 format, this makes it
compatible with webkit and will allow for easy externalization of
 strings. One byte strings are retained for pure ASCII strings.
 (The language specification was changed recently to reflect this as
 follows "A string is a sequence of UTF-16 code units").
  • Remove four byte string class and all references to it.
  • Rename some of the string functions in Dart API to make them
consistent and better describe the underlying functionality
 Dart_NewString => Dart_NewStringFromCString
 Dart_NewString8 => Dart_NewStringFromUTF8
 Dart_NewString16 => Dart_NewStringFromUTF16
 Dart_NewString32 => Dart_NewStringFromUTF32
 Dart_NewExternalString8 => Dart_NewExternalUTF8String
 Dart_NewExternalString16 => Dart_NewExternalUTF16String
 Dart_NewExternalString32 => Dart_NewExternalUTF32String
 Dart_StringGet8 => Dart_StringToUTF8
 Dart_StringGet16 => Dart_StringToUTF16
 Dart_StringToCString => Dart_StringToCString
 Dart_IsString8 => Removed
 Dart_IsString16 -> Removed
 Dart_StringToBytes -> Removed
 Dart_StringGet32 -> Removed
 Review URL: https://codereview.chromium.org//11318018
修正量が多いので、ポイントだけ確認したけど、大体コメントのとおり


r14350 | srdjan@google.com | 2012-11-01 01:35:30 +0900 (木, 01 11月 2012) | 2 lines
Use unary class checks when emitting instance calls in optimized mode.
EmitEqualityAsInstanceCall()の中で、
UnaryClassChecks()を高速なasm生成で置き換えた?
あまり自信ない。

r14343 | fschneider@google.com | 2012-10-31 23:53:15 +0900 (水, 31 10月 2012) | 2 lines
Relational comparisons for unboxed mints.
kMintCidでは、Deoptimizeなしと、SideEffectなしを追加。
上記は、SmiとMintとDoubleが該当する。
Mintは、kDoubleと同様にboxingされているが、ia32とx64で実装が異なる。
NumberOfChecks() == 1の条件が緩和されて、
!= 1 かつ HasTwoMintOrSmi()でもkMintCidに特殊化
ia32において、
RelationalOpInstr::MakeLocationSummary()を拡張
Mintがxmmに乗ってる前提で比較を行う。
EmitUnboxedMintComparisonOp()を追加
これはRelationalOpのうち、LT GT LTE GTEのみ扱う。
xmmに格納された値を、pextrdでhiを取得してcmpl
pextrdでlowを取得してcmpl
上記結果を踏まえてどっかに飛ぶ
x64向けに修正はない。

r14324 | lrn@google.com | 2012-10-31 19:32:54 +0900 (水, 31 10月 2012) | 9 lines
Change signature of noSuchMethod to take an InvocationMirror.
Requires VM and dart2js/dart2dart changes to work.
InvocationMirrorとAllocateInvocationMirrorに対応
parserがAllocateInvocationMirror()
codegenがInvokeNoSuchMethodFunction()
flowgraphbuilderがBuildStaticNoSuchMethodCal()
Symbols::AllocateInvocationMirror()を生成して呼び出すのと、
NoSuchMethodを呼び出しているけど、
どういうことかよくわからん。。

r14309 | srdjan@google.com | 2012-10-31 05:59:22 +0900 (水, 31 10月 2012) | 2 lines
Fix equality instruction to switch from checked (polymorphic) to megamorphic state.
This helps dart2js as it eliminates excessive deoptimizations
(probeForAdding runs now in optimized mode) -> 5% improvement.
IsPolymorphic()ってみやすい
オプション max-polymorphic-checks=4を追加

r14304 | srdjan@google.com | 2012-10-31 04:59:58 +0900 (水, 31 10月 2012) | 2 lines
Add range to kBIT_AND with positive constants. Use that range to eliminate compares in left shifts.
RangeAnalysis向けの修正
kBIT_ANDを走査した際に、RangeBoundaryを狭める処理を追加
BinarySmiOpInstrのkSHLをemitする際、
Range情報を使ってshift幅がRangeの範囲内に収まっていれば、cmpl命令生成を畳み込む。

r14296 | hausner@google.com | 2012-10-31 02:45:36 +0900 (水, 31 10月 2012) | 4 lines
Disallow 'dynamic' as type parameter name
Fixes issue 2492
parserの修正

r14295 | srdjan@google.com | 2012-10-31 02:27:58 +0900 (水, 31 10月 2012) | 2 lines
Fix issue 6403: do not crash if super indexed load does not exist
(return 'no-such-method call' instrcution as result.
ReturnDefinition()が抜けていたのを追加。

r14293 | vegorov@google.com | 2012-10-31 01:26:46 +0900 (水, 31 10月 2012) | 11 lines
Allow bound check elimination to eliminate checks
when both array length and index boundaries are expressed through the same symbol.
For example:
var list = new List(n);
for (var i = 0; i < n; i++) list[i];
R=fschneider@google.com
IsRedundant()の引数にRangeBoundaryのlengthを追加。
削除対象のCheckArrayBoundInstrのlengthを取得して、IsRedundant()にかけて冗長か判定する。
SameSymbolでoffsetが範囲に収まれば冗長と判断

Trait用のArrayLengthDataクラスを作成
合わせて、Trait用にhashmapを拡張。
ArrayのAllocation箇所を辿ってlengthを探すが、arrayとlengthのペアをキャッシュするために必要。

CheckArrayBoundInstrからlengthを探す、LoadArrayLength()を作成
BuilderでConstractorCallを辿った際に、kArrayCidとkGrowableConstructorだった場合は、
Constructor型を記録しておく。
LoadArrayLength()では、Allocationの箇所を辿れる場合、
constructorからlengthを取得し、キャッシュする。
辿れない場合、lengthを取得するLoadFiledInstrを生成し、キャッシュする。
キャッシュしたlengthは、最終的にIsRedundant()で参照される。

r14281 | ajohnsen@google.com | 2012-10-30 23:19:57 +0900 (火, 30 10月 2012) | 5 lines
Move StringImplementation from coreimpl to core as _StringImpl.
classはcore_impl_libからcore_libへ置換

r14274 | ajohnsen@google.com | 2012-10-30 22:25:04 +0900 (火, 30 10月 2012) | 5 lines
Move ListImplementation from coreimpl to core, as a private member.
symbolsがListImplementationが_ListImplに置換
classはcore_impl_libからcore_libへ置換

r14258 | vegorov@google.com | 2012-10-30 19:27:51 +0900 (火, 30 10月 2012) | 14 lines
1.Fold away x === null comparisons when propagated cid of x is not kDynamicCid.
2.Eliminate single operand phis that appear in the graph after constant propagation.
3.Recognize constructors for _ObjectArray and _GrowableObjectArray.
4.Fix bug in result cid recognition for List.
constructor call. A call with an argument does not guarantee
that fixed size array (kArrayCid) is returned.
These changes together allow us to produce better code after inlining of List constructor,
otherwise we lose information due to non-specialized control-flow
that chooses between _GrowableObjectArray and _ObjectArray.
R=kmillikin@google.com
小さい修正を4点。
VisitStrictCompare()中で、冗長なphiを削除

r14252 | kmillikin@google.com | 2012-10-30 18:50:35 +0900 (火, 30 10月 2012) | 9 lines
Compress deoptimization information by sharing common suffixes.
For all the deoptimization entries in a function, build a suffix trie.
Add a new deoptimization instruction that indicates the rest of the translation
is a fixed-length suffix of another entry.
CreateDeoptInfo()の引数にDeoptInfoBuilder builderを追加
parsed_function()から新たに生成せず、引数のbuilderを使いまわす。
builderの中に、object_tableをもって、生成時のコスト削減してるのだと思う。
DeoptInfoBuilderが、DeoptInstrをSuffix Trieで共通化して、Findを高速化?


r14249 | kmillikin@google.com | 2012-10-30 18:37:35 +0900 (火, 30 10月 2012) | 10 lines
Simplify the implementation and generated code for the IC stubs.
The implementation now uses the same code for 1 and >1 argument cases.
For the 1 argument case the generated code is essentially the same code as before.
For the >1 argument case the generated code is slightly improved.
R=fschneider@google.com
リファクタリング
じゃっかん無駄なアセンブラ減ったかも。

r14237 | iposva@google.com | 2012-10-30 09:52:21 +0900 (火, 30 10月 2012) | 3 lines
  • GrowableArray::RemoveLast returns the value being removed
to avoid having to call Last() followed by RemoveLast().
 Review URL: https://codereview.chromium.org//11348026
void RemoveLast -> T& RemoveLast()
に伴い、全体をリファクタリング

r14236 | srdjan@google.com | 2012-10-30 09:48:11 +0900 (火, 30 10月 2012) | 2 lines
Propagate ICData from unoptimized code to instance calls in optimized code.
GenerateInstanceCallの引数を整理してconst ICDataを追加、他削除。リファクタリングかな?
じゃっかんsnapshotに影響あるかも?

r14234 | regis@google.com | 2012-10-30 09:06:24 +0900 (火, 30 10月 2012) | 3 lines
Fix wrong canonicalization of signature class due to name collision (issue 6353).
Add test.
IsDynamicType()からIsObjectType()に変わっているけどよくわからん。

r14233 | hausner@google.com | 2012-10-30 09:02:22 +0900 (火, 30 10月 2012) | 4 lines
Handle super call to unary operators
Fix issue 1288.
vm/symbols.hにSuperを追加
parserを大きく修正し、IsPrimaryNode()かつIsSuper()向けの処理を追加。
BuildUnarySuperOperator() kNEGATEとkBIT_NOTが対象。
syntaxに変更あったんだっけ?

r14224 | asiva@google.com | 2012-10-30 06:17:54 +0900 (火, 30 10月 2012) | 2 lines
Fix for issue 6311 (serialize the right type).
snapshot時に、reinterpret_cast<>しないように修正

r14221 | iposva@google.com | 2012-10-30 05:26:14 +0900 (火, 30 10月 2012) | 4 lines
  • Avoid recursion in the scavenger by remembering weak properties
with reachable keys in a stack.
  • Added assertion to trigger when scavenger is called recursively.
scavengerの修正.
DelayedWeakStackっってのが追加
delayed_weak_stackに、WeakPropertyを記録しておいて、
ProcessToSpace()の最後にvisitする。

r14215 | regis@google.com | 2012-10-30 03:31:24 +0900 (火, 30 10月 2012) | 2 lines
Remove --reject_named_argument_as_positional flag from the VM.
オプションと処理を削除

r14173 | ajohnsen@google.com | 2012-10-29 17:38:15 +0900 (月, 29 10月 2012) | 5 lines
Move Arrays, Collections and Maps into a new library, dart:collections.
bootstrapの対象に追加
bootstrapでは、LoadScriptを呼ぶらしい。
vm.gypiの中身は興味深い。
dartのlibraryをsnapshotしてバイナリにした後で、
generate_collection_ccみたいなのにバイナリを埋め込む。
const char []にして.ccのソースコードを生成して、
コンパイルしてオブジェクトに取り込んでいるという理解でいいのかな。

r14157 | hausner@google.com | 2012-10-27 07:31:49 +0900 (土, 27 10月 2012) | 8 lines
More fixes for super[]
Extend the LoadIndexedNode to also handle super[] and super[]=
Make sure super []= returns the value.
Handle side effects in index expression correctly.
Defer operator function resolution to the flow graph build phase.
LoadIndexedNodeに、Class super_classを引数に追加
REsolveDynamicでsuper_functionが存在する場合、
StaticCallInstrを生成する。そうでない場合、修正前と同じくInstanceCallInstr
StoreIndexedの場合も同様。
NoSuchMethodCallっていう命令があると。
上記はFlowGraphBuilderで処理することになり、
parserで行っていた処理が置き換えられた。
性能の変化はないかも。

r14141 | vegorov@google.com | 2012-10-27 01:04:55 +0900 (土, 27 10月 2012) | 10 lines
Simple array bounds check elimination on top of range analysis framework.
Currenly eliminates only bounds checks
when there is an implicit constraint bounding index's range with array length.
Does not eliminate redundancy in expressions like a[i + 1], a[i].
R=fschneider@google.com
LoadFieldInstrがArrayLength系だった場合、0~Array::kMaxElementsのRangeを生成する。

BinarySmiInstrを走査した際に、SymbolとConstantとの計算だった場合、
SymbolのoffsetとしてRangeBoundaryを計算する。
SymbolicAdd()
SymbolicSub()
Symbol(変数)と定数とのAdd/Subを対象にRangeBoundaryを計算する。
Add(Symbol a, Constant b) --> RangeBoundary(a, a.offset() + b.value())
Sub(Symbol a, Constant b) --> RangeBoundary(a, a.offset() - b.value())

RangeAnalysis::InferRangesRecursive()から呼ぶ,
CheckArrayBoundInstr::IsRedundant() {
で冗長かどうか判定する。


r14131 | fschneider@google.com | 2012-10-26 21:28:11 +0900 (金, 26 10月 2012) | 4 lines
Small performance fix for mint equality operation.
Mint compares don't have side effects and can't deoptimize.
kMintCidを条件判定に追加

r14122 | lrn@google.com | 2012-10-26 17:28:33 +0900 (金, 26 10月 2012) | 3 lines
Convert NoMoreElementsException and EmptyQueueException to StateError.
libのほうはたくさん修正されているけど、vmの中身はコメントの修正のみ。

r14121 | ager@google.com | 2012-10-26 17:00:05 +0900 (金, 26 10月 2012) | 8 lines
Introduce VM API for the patching mechanism.
This will be used to use patching for the dart:io library.
R=iposva@google.com
Dart_LoadPatch(library, source, patch)を追加
externalシンボル付きのsourceに対して、patchシンボル付きの実装をLoadするらしい。

r14118 | cshapiro@google.com | 2012-10-26 10:26:56 +0900 (金, 26 10月 2012) | 3 lines
Avoid integer overflow when computing the size of new space in bytes.
intからintptr_tに変更

r14113 | iposva@google.com | 2012-10-26 08:46:01 +0900 (金, 26 10月 2012) | 4 lines
  • Consolidate code into the old generation.
  • Record pointers between code objects.
  • Collect unreferenced code objects.
GC向けの修正
heapからcode_spaceがなくなった。。
codeは、heapのold_spaceのHeapPage::kExecutableに格納されるらしい。
また、OldSpaceと同様の処理で、MakSweep()の対象になっている。
UpdateResolvedStaticCall()追加 PatchStaticCall()とFixCallerTarget()から呼ばれる。
resolved_static_calls領域は、Heap::kOldに作成して管理
Heapには、DataかExecutableのフラグを用意し、
VirtualMemory::Protectionを設定する際に、Executeを与えたり、
Read|Writeを設定している。

if (is_executable) {
memset(reinterpret_cast<void*>(current), 0xcc, obj_size);
}
デバッガで追う際のメモリリーク検出用?


r14112 | tball@google.com | 2012-10-26 08:38:45 +0900 (金, 26 10月 2012) | 5 lines
Updated GetTimeZoneName() to return "" if localtime_r fails or has a NULL for its tm_zone value,
like V8 does.
Also updated GetTimeZoneOffsetInSeconds() to return 0 on localtime_r failure, like V8.
BUG=5943
os_*.ccの修正
localtime_rが失敗した際に、""を返す。

r14098 | srdjan@google.com | 2012-10-26 05:18:54 +0900 (金, 26 10月 2012) | 4 lines
Check class instruction supports Smi check. This fixes missed inlining of isOdd/isEven
Fixed a nasty bug in equality optimization.
Make sure that we emit CheckSmiInstr instead of CheckClassInstr if we are only checking for smi.
CheckClassInstrを生成する際、もしSmiのCheckClassだった場合、
CheckSmiInstrを生成するように変更。

r14079 | fschneider@google.com | 2012-10-25 23:31:44 +0900 (木, 25 10月 2012) | 10 lines
Small IL cleanup.
1. Remove manual inlining and intrinsification of Double.toDouble
 and Integer.toInt. The flow graph inliner can handle these since
  they are not native library functions.

2. Remove unused member instance_call_ from UnarySmiOp.
R=kmillikin@google.com
DoubleToDoubleと、IntegerToIntegerを削除
code_generatorからも削除
optimizerのspecializeする処理も削除

r14068 | vegorov@google.com | 2012-10-25 20:38:31 +0900 (木, 25 10月 2012) | 10 lines
Simplify range analysis algorithm.
Replace generic fix point range analysis algorithm
based on widening and narrowing operators with an ad hoc single dominator tree pass.
To improve precision discover initial value and direction of the growth for simple induction variables.
R=fschneider@google.com
BUG=
RangeBoundaryとは別に、
Direction、kUnknown, kPositive, kNegative, kBothを用意した。
WidenMin/Max NarrowMin/Maxするのは止めたらしい。
代わりに、InferInductionVariableRange()を実装。
IVは、LoopHeaderのPHIを起点から探し、
SmiのPHI->BinarySmiInstrを辿っってDirectionを更新する。
Directionだけでなく、LLVMのScalarEvolutionぽいかんじに、
BasicRecurrenceのみ生成するようにして
IVの終値を記録するようにすれば、何か効果があるだろうか?

r14065 | ager@google.com | 2012-10-25 18:57:06 +0900 (木, 25 10月 2012) | 7 lines
Revert change that was based on a local change that was not
part of the test script change.
R=sgjesse@google.com
BUG=
14064をrevert

r14064 | ager@google.com | 2012-10-25 18:38:51 +0900 (木, 25 10月 2012) | 6 lines
Fix CCTestSuite in test.dart.
R=sgjesse@google.com
BUG=
testのメッセージを変更

r14053 | srdjan@google.com | 2012-10-25 09:33:11 +0900 (木, 25 10月 2012) | 2 lines
Hopefully fix warnings of uninitialized variables.
???

r14051 | srdjan@google.com | 2012-10-25 09:24:17 +0900 (木, 25 10月 2012) | 2 lines
Intrinsify Mint/Smi combined comparisons by extending a Smi
to a 64 bit integer and doing a 64-bit integer compare (ia32 only).
Push64SmiOrMint()ってemitterができた。
ia32の場合、 Smiをuntagしてpushl*2するコードか、Mintをpushl*2するコードを生成する。
ia32において、SmiとMintが混在するケースで、CompareIntegersを高速化する。
それまでCompareIntegersは、BothSmiしか出力できなかった。

r14046 | iposva@google.com | 2012-10-25 07:29:34 +0900 (木, 25 10月 2012) | 3 lines
Do not pre-resolve static calls.
This makes it easier to record the out-going edges to other generated code.
function.HasCode()のパスを削除。

r14036 | srdjan@google.com | 2012-10-25 05:38:53 +0900 (木, 25 10月 2012) | 2 lines
Trace when disabling optimized code (--trace-disabling-optimized-code)
オプション追加
codeの出力は、ToFullyQualifiedCString() %sでPrintしてるだけ。面白い。
il_printerに統合されるかもね。

r14033 | fschneider@google.com | 2012-10-25 03:18:11 +0900 (木, 25 10月 2012) | 8 lines
Fix deoptimzation bug in hoisting smi operation out of loops.
The hoisted operations used an incorrect deoptimization target
so that the program continued with an incorrect environment
after deoptimization.
TEST=tests/language/deopt_smi_op.dart
bugfix AddDeoptStub()の引数にdeopt_id()を与えるように修正

r14022 | floitsch@google.com | 2012-10-25 00:04:32 +0900 (木, 25 10月 2012) | 3 lines
Make isEmpty a getter.
MethodRecognizerのisEmptyからget:isEmptyに変更

r14015 | floitsch@google.com | 2012-10-24 22:05:11 +0900 (水, 24 10月 2012) | 3 lines
Make hasNext a getter instead of a method.
MethodRecognizerのhasNextからget:hasNextに変更

r14006 | fschneider@google.com | 2012-10-24 19:44:00 +0900 (水, 24 10月 2012) | 20 lines
Enable merging of comparisons into branches in checked mode.
Instead of inserting an explicit type check at branches, the
branch instruction checks the input for boolean itself:

"if (a < b)" will be translated by the flowgraph builder
like this:

CheckedBranch(a < b)

before it would look like this:

t1 <- (a < b)
 t2 <- AssertBool(t1)
 Branch(t2 === true)

Also in this change:
flow_graph_optimizer.cc contains a small fix of an assert triggered when running
with --trace-optimization.
ComparisonInstrに、is_checked()を持たせ、Emitで参照しAssertBool()を出し分ける。

r14001 | zerny@google.com | 2012-10-24 18:46:24 +0900 (水, 24 10月 2012) | 8 lines
Set previous pointer to graph entry for initial definitions.
This should be replace with direct pointers to the containing block on all
instructions.
R=kmillikin@google.com
FlowGraphにAddInitialDefinitions()を追加
リファクタリング

  • 最終更新:2012-11-18 08:11:13

このWIKIを編集するにはパスワード入力が必要です

認証パスワード