cshapiro@google.com
c065f5bac1
Revert "Finalize reachable weak persistent handles at isolate shutdown."
...
This reverts commit b67c5b5d0651a6c9d335ff5ce511901948fd1a51.
Review URL: https://chromiumcodereview.appspot.com//10917126
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12006 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 03:50:44 +00:00
cshapiro@google.com
bdb1e2509f
Finalize reachable weak persistent handles at isolate shutdown.
...
BUG=http://code.google.com/p/dart/issues/detail?id=4071
Review URL: https://chromiumcodereview.appspot.com//10910123
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12005 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 03:14:41 +00:00
regis@google.com
7cc84c2892
Implement new optional parameters syntax in the vm (issue 4290).
...
Provide --reject_named_argument_as_positional flag to ease transition to new
syntax (default is false).
Add tests.
Review URL: https://chromiumcodereview.appspot.com//10910119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12004 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 01:13:27 +00:00
cshapiro@google.com
0cf51fb239
Eliminate a potential warning about extra format arguments.
...
Review URL: https://chromiumcodereview.appspot.com//10908133
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12001 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 00:08:56 +00:00
asiva@google.com
fdbe32e24d
Use external byte arrays for token stream, this moves the token stream out of the isolate heap. For full snapshots the external byte array points to the snapshot buffer thus incurring no extra space in the C heap either.
...
Heap usage stats before this change is:
New space (0k of 32768k) Old space (1085k of 1280k) Code space (0k of 0k)
Heap Usage stats after this change is:
New space (0k of 32768k) Old space (947k of 1024k) Code space (0k of 0k)
A savings of about 138k.
Review URL: https://chromiumcodereview.appspot.com//10914050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11977 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 18:46:51 +00:00
hausner@google.com
e0ed54ea8e
Add named constructor name checking
...
Named constructors may not clash with any other class members.
Add a check but enable it only when --construcotr_name_check
runtime flag is passed to the VM.
Eliminate one named constructor in Process class in core library,
as well as a couple of cases in dart2js.
The dart2js team may want to rename the constructors I changed.
Issue 3990 (http://code.google.com/p/dart/issues/detail?id=3990 )
Review URL: https://chromiumcodereview.appspot.com//10905109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11972 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 18:02:41 +00:00
srdjan@google.com
4201667ccf
In preparation for lazy deoptimization add "is_alive_" field to RawCode: visit embedded pointers only if it is set to true. It will be set to false when patching the code to call lazy deopt-trampoline stub, thus potentially destroying embedded pointers.
...
Review URL: https://chromiumcodereview.appspot.com//10915120
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11969 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 17:07:20 +00:00
srdjan@google.com
b151a744ce
Fix Token::kAS and its printing according to Regis' comment.
...
Review URL: https://chromiumcodereview.appspot.com//10909098
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11968 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 17:03:43 +00:00
vegorov@google.com
a192ac3d9e
Allow smi comparisons to have constant operands.
...
Remove unnecessary temps reserved for them.
Load constants directly in phi moves.
Generate xor(reg, reg) for loading of 0 instead of mov.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10918097
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11947 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 13:27:30 +00:00
fschneider@google.com
725fe7b2d8
Implement loop invariant code motion for check instructions.
...
This CL adds a new optimization pass that hoist loop invariant
instructions upwards out of loops.
I'm adding a deoptimzation point at every Goto so that we
can move deoptimizing instructions like checks out of loops.
As a result there may be multiple deoptimization descriptors
with the same PC. The corresponding assert are removed.
Review URL: https://chromiumcodereview.appspot.com//10909094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11946 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 13:21:20 +00:00
kasperl@google.com
8db48e4171
Revert "Move dart:web to pkg:htmlescape."
...
This reverts r11943.
R=lrn@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10912123
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11945 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 13:17:01 +00:00
lrn@google.com
bd49eef27d
Move dart:web to pkg:htmlescape.
...
Review URL: https://chromiumcodereview.appspot.com//10905125
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11943 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 12:54:59 +00:00
srdjan@google.com
bc1adc3123
Restoring assert that deopt_id() should be accessed only if the instruction can deoptimize. Print resulting ssa_temp_indexes if available. Add an IL printing helper.
...
Review URL: https://chromiumcodereview.appspot.com//10912120
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11941 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 12:18:23 +00:00
vegorov@google.com
28e3a61d5b
Allow test context to have multiple true and false branch slots.
...
Implement special handling for && and || in the test context to eliminate materialization of intermediate boolean values.
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10916119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11932 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 10:13:54 +00:00
srdjan@google.com
8f313942ed
Do not append input value of AS comparison if the check is eliminated. Fixes issue 4944, crash caused by incorrect stack size at exit.
...
Review URL: https://chromiumcodereview.appspot.com//10919119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11929 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 09:21:35 +00:00
zerny@google.com
7bd2eba770
Execute deoptimization instruction in reverse order.
...
This is in preparation for deoptimization of inlined calls where it simplifies
calculating the frame pointer for nested frames.
R=kmillikin@google.com
Review URL: https://chromiumcodereview.appspot.com//10915087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11928 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 09:12:32 +00:00
kmillikin@google.com
5dbe813aff
Fix a small but embarassing braino.
...
Fix a bug that limited open-coded arithmetic to once per basic block in the
optimizing compiler.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10916139
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11925 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 08:40:07 +00:00
cshapiro@google.com
fa741e74e6
A third attempt to provide correct conversion specifiers on MacOS.
...
Review URL: https://chromiumcodereview.appspot.com//10905120
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11915 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 01:32:19 +00:00
cshapiro@google.com
26b843c7ee
Fix build break on Win32 and MacOS related to printf format string checks.
...
Implement remaining inttypes.h format specifiers on Win32
Resolve some conversion specifier discrepancies on MacOS.
Review URL: https://chromiumcodereview.appspot.com//10928013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11913 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 01:14:09 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
asiva@google.com
8aec37055a
Rename Builtin::LoadLibrary to Builtin::LoadAndCheckLibrary as the name
...
LoadLibrary seems to conflict with some windows predefined macros causing
build failures on windows build of dartium.
Review URL: https://chromiumcodereview.appspot.com//10905102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11894 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 18:49:07 +00:00
kmillikin@google.com
0750c472dc
Reapply "Remove classes Computation and BindInstr."
...
Reapply svn revision 11868 with a bugfix.
Original code review at http://codereview.chromium.org/10908091/
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10912094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11890 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 17:04:49 +00:00
kmillikin@google.com
7e36720fa8
Revert "Remove classes Computation and BindInstr."
...
This reverts svn revision 11868.
TBR=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10917085
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11869 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 11:20:14 +00:00
kmillikin@google.com
bd84c7ee22
Remove classes Computation and BindInstr.
...
The former Computation classes are folded into the Instruction class
hierarchy.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10908091
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11868 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 11:15:34 +00:00
tball@google.com
90bd62f488
Fixed parsing of parameterized type test assert statement in production mode.
...
BUG=3741
TEST=Verified with bug's test, plus all VM tests.
Review URL: https://chromiumcodereview.appspot.com//10911042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11843 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 21:42:20 +00:00
hausner@google.com
dce2c6a275
Catch illegally declared constructors
...
Constructors cannot be abstract or static.
Review URL: https://chromiumcodereview.appspot.com//10910079
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11842 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 21:28:48 +00:00
regis@google.com
2ea2249b48
Fix argument definition test (issue 4888).
...
Review URL: https://chromiumcodereview.appspot.com//10907064
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11835 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 18:59:01 +00:00
fschneider@google.com
30a026f240
Support immediate operands for array bounds checks.
...
Review URL: https://chromiumcodereview.appspot.com//10916090
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11824 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 15:15:36 +00:00
vegorov@google.com
1911b2bc81
Make register allocator to disregard constant computation with no uses.
...
Inline constant values into environments, instead of creating a use of the constant definition.
Change BinarySmiOpComp code template to allow inline constant uses for the right hand side.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10916082
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11798 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 09:58:57 +00:00
fschneider@google.com
d25bfcb4c5
Revert r11772: Add check for non-smi to the IL and use it for class checks.
...
In its current state this causes some performance regressions because
we can't eliminate non-smi checks properly in the optimizer.
TBR=vegorov@google.com
Review URL: https://chromiumcodereview.appspot.com//10905065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11774 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 16:56:31 +00:00
fschneider@google.com
c045c3aff1
Add check for non-smi to the IL and use it for class checks.
...
Review URL: https://chromiumcodereview.appspot.com//10911057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11772 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 15:19:27 +00:00
fschneider@google.com
528a73268a
Landing: Remove the is_used_ field from BindInstr.
...
Original CL: https://chromiumcodereview.appspot.com/10916078/
Review URL: https://chromiumcodereview.appspot.com//10908058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11768 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 14:35:02 +00:00
fschneider@google.com
dde514004c
Remove old implementation of binary double operations.
...
With the new unboxed operations, the old one is not needed anymore.
Review URL: https://chromiumcodereview.appspot.com//10914066
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11767 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 14:28:34 +00:00
fschneider@google.com
ba65b47ae4
Eliminate environment uses at smi-comparisons.
...
Smi comparisons can't deoptimize. Therefore we can eliminate
their deoptimization environnment.
Review URL: https://chromiumcodereview.appspot.com//10908057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11764 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 13:07:21 +00:00
kmillikin@google.com
2b4a2cf570
Change the order of definitions in intermediate_language.h.
...
This is a cosmetic change to reorder definitions in intermediate_language.h
so that all the instruction classes are defined before all the computation
classes.
R=zerny@google.com
Review URL: https://chromiumcodereview.appspot.com//10905015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11761 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 12:21:30 +00:00
fschneider@google.com
cc2901fc05
Add explicit smi-checks to smi comparisons.
...
This change works around some difficulties that come from
the distiction between Instruction and Computation in our IL.
We have now two instructions that can wrap a computation and
that makes visiting and replacing in the flow graph optimizer
harder. I added some helpers to work around this for now.
Also fix register constraints for double comparisons: xmm1
is used, but was not reserved as temp.
Review URL: https://chromiumcodereview.appspot.com//10914008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11758 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 11:37:37 +00:00
vegorov@google.com
17753b35b4
Specialize binary operations with mixed Smi-Double feedback as Double ones.
...
Fix specialization of DIV operation (missing break).
Don't specialize double MOD operation: we have no fast path code to handle it in the codegen.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10915053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11757 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 11:30:16 +00:00
fschneider@google.com
997f81a579
Only store IC data with instructions that collect type feedback.
...
Currently only three instructions collect IC data:
InstanceCall, EqualityOp and RelationalOp.
Specialized instructions use the IC data of the original
instance call or convert the original IC data for their
purpose.
This CL eliminates ic_data_ member from Computation and avoids
the explicit setting of ic_data in the flow graph optimizer.
Review URL: https://chromiumcodereview.appspot.com//10910003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11756 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 11:27:09 +00:00
kasperl@google.com
7a535d3226
Disable all support for legacy try-catch in the VM.
...
R=ngeoffray@google.com ,hausner@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10910060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11754 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 10:15:47 +00:00
srdjan@google.com
a1cab6c167
Split deopt-after and deopt-before handling:
...
- deopt-before describes a deoptimization that occurs before the instructionhas completed and requires a stub
- deopt-after describes deoptimziation after the instruction, used by lazy deooptimization, requires no stub.
Review URL: https://chromiumcodereview.appspot.com//10913031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11720 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 20:18:40 +00:00
turnidge@google.com
4e7971f61e
The forward declaration of Dart_SetReturnValue in native_arguments.h
...
was causing the function to appear to be ambiguous on windows due to
the DART_EXTERN_C annotation. Refactor the code so that a different
function is forward-declared in order to fix the build.
Another fix would have been to prefix all calls to Dart_SetReturnValue
by :: in lib/mirrors.cc, but that looks ugly.
Review URL: https://chromiumcodereview.appspot.com//10919039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11719 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 20:12:21 +00:00
turnidge@google.com
55c13e1994
Use SetReturnUnsafe in dart_api_impl.cc.
...
Before (median of 5):
UseDartApi(RunTime): 384366
After (median of 5);
UseDartApi(RunTime): 313525
Review URL: https://chromiumcodereview.appspot.com//10907012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11717 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 19:59:37 +00:00
hausner@google.com
35d7793891
Throw AbstractClassInstantiationError if an abstract class is instantiated
...
This is the second try to my previous attempt to implement the
new abstract class handling. Instead of a compile-time error,
the VM now throws an AbstractClassInstantiationError at runtime
if an abstract class is instantiated. Added the new error class
to the core library.
For now I'm still using the rule that a class is abstract if it is explicitly
marked as abstract, or if it defines a new abstract method.
Review URL: https://chromiumcodereview.appspot.com//10916039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11708 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 18:06:42 +00:00
asiva@google.com
9ed2e66130
Get rid of support for string interpolation in #import strings.
...
Review URL: https://chromiumcodereview.appspot.com//10911025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11698 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 16:55:03 +00:00
srdjan@google.com
c1325097f1
We can throw an exception but we cannot deoptimize at a runtime call.
...
Remove deopt ids at runtime calls. Mark several computations/instructions that they cannot deoptimize.
Review URL: https://chromiumcodereview.appspot.com//10915026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11693 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 15:46:10 +00:00
tball@google.com
ed5664507b
Removed handle creation and inlined Instance::IsValidNativeIndex().
...
The Dromaeo dom core benchmark shows significant time spent in it,
where ~half the time is spent creating a handle.
Review URL: https://chromiumcodereview.appspot.com//10918016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11673 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 01:49:28 +00:00
asiva@google.com
e7969b98de
Fix for issue 4848 (Added missing store buffer updates when storing an object reference into another object at a number of places).
...
Review URL: https://chromiumcodereview.appspot.com//10918010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11670 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 23:28:22 +00:00
srdjan@google.com
6eeeadecd6
Remove deprecated deoptimization code.
...
Review URL: https://chromiumcodereview.appspot.com//10911022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11668 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 23:20:47 +00:00
srdjan@google.com
06c5d1b818
Add disassembly of movaps to ia32 disassembler (movaps is better than movsd, avoids stalls etc.)
...
Review URL: https://chromiumcodereview.appspot.com//10917022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11666 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 22:55:53 +00:00
regis@google.com
9e00bd8ccb
Implement argument definition test in the vm.
...
Add tests.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10915022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11664 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 22:46:44 +00:00