Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: runtime/vm/code_generator.cc

Issue 512933002: Use PassiveObject were possible. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/bigint_operations.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 259
260 // Make a copy of the given context, including the values of the captured 260 // Make a copy of the given context, including the values of the captured
261 // variables. 261 // variables.
262 // Arg0: the context to be cloned. 262 // Arg0: the context to be cloned.
263 // Return value: newly allocated context. 263 // Return value: newly allocated context.
264 DEFINE_RUNTIME_ENTRY(CloneContext, 1) { 264 DEFINE_RUNTIME_ENTRY(CloneContext, 1) {
265 const Context& ctx = Context::CheckedHandle(arguments.ArgAt(0)); 265 const Context& ctx = Context::CheckedHandle(arguments.ArgAt(0));
266 Context& cloned_ctx = Context::Handle(Context::New(ctx.num_variables())); 266 Context& cloned_ctx = Context::Handle(Context::New(ctx.num_variables()));
267 cloned_ctx.set_parent(Context::Handle(ctx.parent())); 267 cloned_ctx.set_parent(Context::Handle(ctx.parent()));
268 Instance& inst = Instance::Handle(isolate);
268 for (int i = 0; i < ctx.num_variables(); i++) { 269 for (int i = 0; i < ctx.num_variables(); i++) {
269 cloned_ctx.SetAt(i, Instance::Handle(ctx.At(i))); 270 inst = ctx.At(i);
271 cloned_ctx.SetAt(i, inst);
270 } 272 }
271 arguments.SetReturn(cloned_ctx); 273 arguments.SetReturn(cloned_ctx);
272 } 274 }
273 275
274 276
275 // Helper routine for tracing a type check. 277 // Helper routine for tracing a type check.
276 static void PrintTypeCheck( 278 static void PrintTypeCheck(
277 const char* message, 279 const char* message,
278 const Instance& instance, 280 const Instance& instance,
279 const AbstractType& type, 281 const AbstractType& type,
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 field.RecordStore(value); 1584 field.RecordStore(value);
1583 } 1585 }
1584 1586
1585 1587
1586 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { 1588 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
1587 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); 1589 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1588 field.EvaluateInitializer(); 1590 field.EvaluateInitializer();
1589 } 1591 }
1590 1592
1591 } // namespace dart 1593 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bigint_operations.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698