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

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

Issue 10665038: Remove old code generator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/stub_code_ia32.cc ('k') | runtime/vm/vm_sources.gypi » ('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) 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/assembler_macros.h" 9 #include "vm/assembler_macros.h"
10 #include "vm/code_generator.h"
11 #include "vm/compiler.h" 10 #include "vm/compiler.h"
11 #include "vm/flow_graph_compiler.h"
12 #include "vm/object_store.h" 12 #include "vm/object_store.h"
13 #include "vm/pages.h" 13 #include "vm/pages.h"
14 #include "vm/resolver.h" 14 #include "vm/resolver.h"
15 #include "vm/scavenger.h" 15 #include "vm/scavenger.h"
16 #include "vm/stub_code.h" 16 #include "vm/stub_code.h"
17 17
18 18
19 #define __ assembler-> 19 #define __ assembler->
20 20
21 namespace dart { 21 namespace dart {
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 // - If receiver is null -> jump to IC miss. 1540 // - If receiver is null -> jump to IC miss.
1541 // - If receiver is Smi -> load Smi class. 1541 // - If receiver is Smi -> load Smi class.
1542 // - If receiver is not-Smi -> load receiver's class. 1542 // - If receiver is not-Smi -> load receiver's class.
1543 // - Check if 'num_args' (including receiver) match any IC data group. 1543 // - Check if 'num_args' (including receiver) match any IC data group.
1544 // - Match found -> jump to target. 1544 // - Match found -> jump to target.
1545 // - Match not found -> jump to IC miss. 1545 // - Match not found -> jump to IC miss.
1546 void StubCode::GenerateNArgsCheckInlineCacheStub(Assembler* assembler, 1546 void StubCode::GenerateNArgsCheckInlineCacheStub(Assembler* assembler,
1547 intptr_t num_args) { 1547 intptr_t num_args) {
1548 __ movq(RCX, FieldAddress(RBX, ICData::function_offset())); 1548 __ movq(RCX, FieldAddress(RBX, ICData::function_offset()));
1549 __ incq(FieldAddress(RCX, Function::usage_counter_offset())); 1549 __ incq(FieldAddress(RCX, Function::usage_counter_offset()));
1550 if (CodeGenerator::CanOptimize()) { 1550 if (FlowGraphCompiler::CanOptimize()) {
1551 __ cmpq(FieldAddress(RCX, Function::usage_counter_offset()), 1551 __ cmpq(FieldAddress(RCX, Function::usage_counter_offset()),
1552 Immediate(FLAG_optimization_counter_threshold)); 1552 Immediate(FLAG_optimization_counter_threshold));
1553 Label not_yet_hot; 1553 Label not_yet_hot;
1554 __ j(LESS_EQUAL, &not_yet_hot, Assembler::kNearJump); 1554 __ j(LESS_EQUAL, &not_yet_hot, Assembler::kNearJump);
1555 AssemblerMacros::EnterStubFrame(assembler); 1555 AssemblerMacros::EnterStubFrame(assembler);
1556 __ pushq(RBX); // Preserve inline cache data object. 1556 __ pushq(RBX); // Preserve inline cache data object.
1557 __ pushq(R10); // Preserve arguments array. 1557 __ pushq(R10); // Preserve arguments array.
1558 __ pushq(RCX); // Argument for runtime: function object. 1558 __ pushq(RCX); // Argument for runtime: function object.
1559 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry); 1559 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
1560 __ popq(RCX); // Remove argument. 1560 __ popq(RCX); // Remove argument.
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { 1913 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) {
1914 __ movq(RAX, RCX); // error object. 1914 __ movq(RAX, RCX); // error object.
1915 __ movq(RBP, RDX); // target frame_pointer. 1915 __ movq(RBP, RDX); // target frame_pointer.
1916 __ movq(RSP, RSI); // target stack_pointer. 1916 __ movq(RSP, RSI); // target stack_pointer.
1917 __ jmp(RDI); // Jump to the exception handler code. 1917 __ jmp(RDI); // Jump to the exception handler code.
1918 } 1918 }
1919 1919
1920 } // namespace dart 1920 } // namespace dart
1921 1921
1922 #endif // defined TARGET_ARCH_X64 1922 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698