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

Side by Side Diff: dart/runtime/vm/stub_code_ia32.cc

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 | « dart/runtime/vm/stub_code_arm.cc ('k') | dart/runtime/vm/stub_code_mips.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/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 __ jmp(&StubCode::TwoArgsCheckInlineCacheLabel()); 1931 __ jmp(&StubCode::TwoArgsCheckInlineCacheLabel());
1932 __ Bind(&test_three); 1932 __ Bind(&test_three);
1933 __ cmpl(EBX, Immediate(3)); 1933 __ cmpl(EBX, Immediate(3));
1934 __ j(NOT_EQUAL, &test_four, Assembler::kNearJump); 1934 __ j(NOT_EQUAL, &test_four, Assembler::kNearJump);
1935 __ jmp(&StubCode::ThreeArgsCheckInlineCacheLabel()); 1935 __ jmp(&StubCode::ThreeArgsCheckInlineCacheLabel());
1936 __ Bind(&test_four); 1936 __ Bind(&test_four);
1937 __ Stop("Unsupported number of arguments tested."); 1937 __ Stop("Unsupported number of arguments tested.");
1938 } 1938 }
1939 1939
1940 1940
1941 // Called only from unoptimized code.
1942 void StubCode::GenerateDebugStepCheckStub(Assembler* assembler) {
1943 // Check single stepping.
1944 Label not_stepping;
1945 __ movl(EAX, FieldAddress(CTX, Context::isolate_offset()));
1946 __ movzxb(EAX, Address(EAX, Isolate::single_step_offset()));
1947 __ cmpl(EAX, Immediate(0));
1948 __ j(EQUAL, &not_stepping, Assembler::kNearJump);
1949
1950 __ EnterStubFrame();
1951 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
1952 __ LeaveFrame();
1953 __ Bind(&not_stepping);
1954 __ ret();
1955 }
1956
1957
1941 // Used to check class and type arguments. Arguments passed on stack: 1958 // Used to check class and type arguments. Arguments passed on stack:
1942 // TOS + 0: return address. 1959 // TOS + 0: return address.
1943 // TOS + 1: instantiator type arguments (can be NULL). 1960 // TOS + 1: instantiator type arguments (can be NULL).
1944 // TOS + 2: instance. 1961 // TOS + 2: instance.
1945 // TOS + 3: SubtypeTestCache. 1962 // TOS + 3: SubtypeTestCache.
1946 // Result in ECX: null -> not found, otherwise result (true or false). 1963 // Result in ECX: null -> not found, otherwise result (true or false).
1947 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { 1964 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
1948 ASSERT((1 <= n) && (n <= 3)); 1965 ASSERT((1 <= n) && (n <= 3));
1949 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize; 1966 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize;
1950 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize; 1967 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize;
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 const Register temp = ECX; 2227 const Register temp = ECX;
2211 __ movl(left, Address(ESP, 2 * kWordSize)); 2228 __ movl(left, Address(ESP, 2 * kWordSize));
2212 __ movl(right, Address(ESP, 1 * kWordSize)); 2229 __ movl(right, Address(ESP, 1 * kWordSize));
2213 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 2230 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
2214 __ ret(); 2231 __ ret();
2215 } 2232 }
2216 2233
2217 } // namespace dart 2234 } // namespace dart
2218 2235
2219 #endif // defined TARGET_ARCH_IA32 2236 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « dart/runtime/vm/stub_code_arm.cc ('k') | dart/runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698