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

Unified Diff: src/ia32/full-codegen-ia32.cc

Issue 3388004: Add support for near labels.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/ia32/full-codegen-ia32.cc
===================================================================
--- src/ia32/full-codegen-ia32.cc (revision 5449)
+++ src/ia32/full-codegen-ia32.cc (working copy)
@@ -162,7 +162,7 @@
}
{ Comment cmnt(masm_, "[ Stack check");
- Label ok;
+ NearLabel ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit();
__ cmp(esp, Operand::StaticVariable(stack_limit));
@@ -403,7 +403,7 @@
break;
case Expression::kValue: {
- Label done;
+ NearLabel done;
switch (location_) {
case kAccumulator:
__ bind(materialize_true);
@@ -685,7 +685,7 @@
// Perform the comparison as if via '==='.
__ mov(edx, Operand(esp, 0)); // Switch value.
if (ShouldInlineSmiCase(Token::EQ_STRICT)) {
- Label slow_case;
+ NearLabel slow_case;
__ mov(ecx, edx);
__ or_(ecx, Operand(eax));
__ test(ecx, Immediate(kSmiTagMask));
@@ -745,7 +745,7 @@
__ j(equal, &exit);
// Convert the object to a JS object.
- Label convert, done_convert;
+ NearLabel convert, done_convert;
__ test(eax, Immediate(kSmiTagMask));
__ j(zero, &convert);
__ CmpObjectType(eax, FIRST_JS_OBJECT_TYPE, ecx);
@@ -786,7 +786,7 @@
__ j(zero, &call_runtime);
// For all objects but the receiver, check that the cache is empty.
- Label check_prototype;
+ NearLabel check_prototype;
__ cmp(ecx, Operand(eax));
__ j(equal, &check_prototype);
__ mov(edx, FieldOperand(edx, DescriptorArray::kEnumCacheBridgeCacheOffset));
@@ -801,7 +801,7 @@
// The enum cache is valid. Load the map of the object being
// iterated over and use the cache for the iteration.
- Label use_cache;
+ NearLabel use_cache;
__ mov(eax, FieldOperand(eax, HeapObject::kMapOffset));
__ jmp(&use_cache);
@@ -813,7 +813,7 @@
// If we got a map from the runtime call, we can do a fast
// modification check. Otherwise, we got a fixed array, and we have
// to do a slow check.
- Label fixed_array;
+ NearLabel fixed_array;
__ cmp(FieldOperand(eax, HeapObject::kMapOffset), Factory::meta_map());
__ j(not_equal, &fixed_array);
@@ -855,7 +855,7 @@
// Check if the expected map still matches that of the enumerable.
// If not, we have to filter the key.
- Label update_each;
+ NearLabel update_each;
__ mov(ecx, Operand(esp, 4 * kPointerSize));
__ cmp(edx, FieldOperand(ecx, HeapObject::kMapOffset));
__ j(equal, &update_each);
@@ -878,7 +878,8 @@
EmitAssignment(stmt->each());
// Generate code for the body of the loop.
- Label stack_limit_hit, stack_check_done;
+ Label stack_limit_hit;
+ NearLabel stack_check_done;
Visit(stmt->body());
__ StackLimitCheck(&stack_limit_hit);
@@ -960,7 +961,7 @@
if (s != NULL && s->is_eval_scope()) {
// Loop up the context chain. There is no frame effect so it is
// safe to use raw labels here.
- Label next, fast;
+ NearLabel next, fast;
if (!context.is(temp)) {
__ mov(temp, context);
}
@@ -1119,7 +1120,7 @@
if (var->mode() == Variable::CONST) {
// Constants may be the hole value if they have not been initialized.
// Unhole them.
- Label done;
+ NearLabel done;
MemOperand slot_operand = EmitSlotSearch(slot, eax);
__ mov(eax, slot_operand);
__ cmp(eax, Factory::the_hole_value());
@@ -1168,7 +1169,7 @@
void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
Comment cmnt(masm_, "[ RegExpLiteral");
- Label materialized;
+ NearLabel materialized;
// Registers will be used as follows:
// edi = JS function.
// ecx = literals array.
@@ -1489,7 +1490,8 @@
OverwriteMode mode,
bool left_is_constant_smi,
Smi* value) {
- Label call_stub, done;
+ NearLabel call_stub;
+ Label done;
__ add(Operand(eax), Immediate(value));
__ j(overflow, &call_stub);
__ test(eax, Immediate(kSmiTagMask));
@@ -2714,7 +2716,7 @@
VisitForValue(args->at(0), kAccumulator); // Load the object.
- Label done;
+ NearLabel done;
// If the object is a smi return the object.
__ test(eax, Immediate(kSmiTagMask));
__ j(zero, &done);
@@ -2745,7 +2747,7 @@
VisitForValue(args->at(1), kAccumulator); // Load the value.
__ pop(ebx); // eax = value. ebx = object.
- Label done;
+ NearLabel done;
// If the object is a smi, return the value.
__ test(ebx, Immediate(kSmiTagMask));
__ j(zero, &done);
@@ -3273,7 +3275,7 @@
VisitForValue(expr->expression(), kAccumulator);
Label done;
if (ShouldInlineSmiCase(expr->op())) {
- Label call_stub;
+ NearLabel call_stub;
__ test(eax, Immediate(kSmiTagMask));
__ j(not_zero, &call_stub);
__ lea(eax, Operand(eax, kSmiTagMask));
@@ -3348,7 +3350,7 @@
}
// Call ToNumber only if operand is not a smi.
- Label no_conversion;
+ NearLabel no_conversion;
if (ShouldInlineSmiCase(expr->op())) {
__ test(eax, Immediate(kSmiTagMask));
__ j(zero, &no_conversion);
@@ -3386,7 +3388,8 @@
}
// Inline smi case if we are in a loop.
- Label stub_call, done;
+ NearLabel stub_call;
+ Label done;
if (ShouldInlineSmiCase(expr->op())) {
if (expr->op() == Token::INC) {
__ add(Operand(eax), Immediate(Smi::FromInt(1)));
@@ -3673,7 +3676,7 @@
}
if (ShouldInlineSmiCase(op)) {
- Label slow_case;
+ NearLabel slow_case;
__ mov(ecx, Operand(edx));
__ or_(ecx, Operand(eax));
__ test(ecx, Immediate(kSmiTagMask));

Powered by Google App Engine
This is Rietveld 408576698