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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 8725009: More --use_slow_path tests, add that VMOption to two tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 1877)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -640,7 +640,11 @@
// RoundedAllocationSize((array_length * kwordSize) + sizeof(RawArray)).
// Assert that length is a Smi.
__ testl(EDX, Immediate(kSmiTagSize));
- __ j(NOT_ZERO, &slow_case, Assembler::kNearJump);
+ if (FLAG_use_slow_path) {
+ __ jmp(&slow_case);
+ } else {
+ __ j(NOT_ZERO, &slow_case, Assembler::kNearJump);
+ }
__ movl(EDI, FieldAddress(CTX, Context::isolate_offset()));
__ movl(EDI, Address(EDI, Isolate::heap_offset()));
__ movl(EDI, Address(EDI, Heap::new_space_offset()));
@@ -971,7 +975,11 @@
// EBX: potential next object start.
// EDX: number of context variables.
__ cmpl(EBX, Address::Absolute(heap->EndAddress()));
- __ j(ABOVE_EQUAL, &slow_case, Assembler::kNearJump);
+ if (FLAG_use_slow_path) {
+ __ jmp(&slow_case);
+ } else {
+ __ j(ABOVE_EQUAL, &slow_case, Assembler::kNearJump);
+ }
// Successfully allocated the object, now update top to point to
// next object start and initialize the object.
@@ -1088,7 +1096,11 @@
// EAX: potential new object start.
// EBX: potential next object start.
__ cmpl(EBX, Address::Absolute(heap->EndAddress()));
- __ j(ABOVE_EQUAL, &slow_case, Assembler::kNearJump);
+ if (FLAG_use_slow_path) {
+ __ jmp(&slow_case);
+ } else {
+ __ j(ABOVE_EQUAL, &slow_case, Assembler::kNearJump);
+ }
// Successfully allocated the object(s), now update top to point to
// next object start and initialize the object.
@@ -1260,15 +1272,16 @@
__ movl(ECX, EBX); // ECX: new context address.
__ addl(EBX, Immediate(context_size));
}
- if (FLAG_use_slow_path) {
- __ jmp(&slow_case);
- }
// Check if the allocation fits into the remaining space.
// EAX: potential new closure object.
// ECX: potential new context object (only if is_implicit_closure).
// EBX: potential next object start.
__ cmpl(EBX, Address::Absolute(heap->EndAddress()));
- __ j(ABOVE_EQUAL, &slow_case, Assembler::kNearJump);
+ if (FLAG_use_slow_path) {
+ __ jmp(&slow_case);
+ } else {
+ __ j(ABOVE_EQUAL, &slow_case, Assembler::kNearJump);
+ }
// Successfully allocated the object, now update top to point to
// next object start and initialize the object.
« no previous file with comments | « no previous file | tests/language/src/ImplicitClosureTest.dart » ('j') | tests/language/src/ImplicitClosureTest.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698