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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 15990004: Generators: Avoid calling into runtime if operand stack is empty (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add asserts to runtime.cc; clarify generated runtime call Created 7 years, 6 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 | « src/arm/full-codegen-arm.cc ('k') | src/ia32/full-codegen-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5032 matching lines...) Expand 10 before | Expand all | Expand 10 after
5043 if (always_allocate_scope) { 5043 if (always_allocate_scope) {
5044 __ dec(Operand::StaticVariable(scope_depth)); 5044 __ dec(Operand::StaticVariable(scope_depth));
5045 } 5045 }
5046 5046
5047 // Runtime functions should not return 'the hole'. Allowing it to escape may 5047 // Runtime functions should not return 'the hole'. Allowing it to escape may
5048 // lead to crashes in the IC code later. 5048 // lead to crashes in the IC code later.
5049 if (FLAG_debug_code) { 5049 if (FLAG_debug_code) {
5050 Label okay; 5050 Label okay;
5051 __ cmp(eax, masm->isolate()->factory()->the_hole_value()); 5051 __ cmp(eax, masm->isolate()->factory()->the_hole_value());
5052 __ j(not_equal, &okay, Label::kNear); 5052 __ j(not_equal, &okay, Label::kNear);
5053 // TODO(wingo): Currently SuspendJSGeneratorObject returns the hole. Change
5054 // to return another sentinel like a harmony symbol.
5055 __ cmp(ebx, Immediate(ExternalReference(
5056 Runtime::kSuspendJSGeneratorObject, masm->isolate())));
5057 __ j(equal, &okay, Label::kNear);
5058 __ int3(); 5053 __ int3();
5059 __ bind(&okay); 5054 __ bind(&okay);
5060 } 5055 }
5061 5056
5062 // Check for failure result. 5057 // Check for failure result.
5063 Label failure_returned; 5058 Label failure_returned;
5064 STATIC_ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0); 5059 STATIC_ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0);
5065 __ lea(ecx, Operand(eax, 1)); 5060 __ lea(ecx, Operand(eax, 1));
5066 // Lower 2 bits of ecx are 0 iff eax has failure tag. 5061 // Lower 2 bits of ecx are 0 iff eax has failure tag.
5067 __ test(ecx, Immediate(kFailureTagMask)); 5062 __ test(ecx, Immediate(kFailureTagMask));
(...skipping 3026 matching lines...) Expand 10 before | Expand all | Expand 10 after
8094 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 8089 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
8095 } 8090 }
8096 } 8091 }
8097 8092
8098 8093
8099 #undef __ 8094 #undef __
8100 8095
8101 } } // namespace v8::internal 8096 } } // namespace v8::internal
8102 8097
8103 #endif // V8_TARGET_ARCH_IA32 8098 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698