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

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

Issue 9471010: Expand the instruction visitor to visit computations and values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small cleanup of comments and identifier naming. Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 19 matching lines...) Expand all
30 const Error& error = Error::Handle( 30 const Error& error = Error::Handle(
31 LanguageError::New(String::Handle(String::New(chars)))); 31 LanguageError::New(String::Handle(String::New(chars))));
32 Isolate::Current()->long_jump_base()->Jump(1, error); 32 Isolate::Current()->long_jump_base()->Jump(1, error);
33 } 33 }
34 34
35 35
36 #define __ assembler_-> 36 #define __ assembler_->
37 37
38 void FlowGraphCompiler::LoadValue(Value* value) { 38 void FlowGraphCompiler::LoadValue(Value* value) {
39 if (value->IsConstant()) { 39 if (value->IsConstant()) {
40 ConstantValue* constant = value->AsConstant(); 40 ConstantVal* constant = value->AsConstant();
41 if (constant->instance().IsSmi()) { 41 if (constant->instance().IsSmi()) {
42 int64_t imm = reinterpret_cast<int64_t>(constant->instance().raw()); 42 int64_t imm = reinterpret_cast<int64_t>(constant->instance().raw());
43 __ movq(RAX, Immediate(imm)); 43 __ movq(RAX, Immediate(imm));
44 } else { 44 } else {
45 __ LoadObject(RAX, value->AsConstant()->instance()); 45 __ LoadObject(RAX, value->AsConstant()->instance());
46 } 46 }
47 } else { 47 } else {
48 ASSERT(value->IsTemp()); 48 ASSERT(value->IsTemp());
49 Bailout("return of non-ConstantValue value"); 49 Bailout("return of non-ConstantValue value");
50 } 50 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 assembler_->CodeSize(), 218 assembler_->CodeSize(),
219 node_id, 219 node_id,
220 token_index, 220 token_index,
221 CatchClauseNode::kInvalidTryIndex); 221 CatchClauseNode::kInvalidTryIndex);
222 } 222 }
223 223
224 224
225 } // namespace dart 225 } // namespace dart
226 226
227 #endif // defined TARGET_ARCH_X64 227 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698