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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 6880321: Removed InvokeJSFlags enum, we already have InvokeFlag for the same purpose. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 __ cmp(r0, null_value); 908 __ cmp(r0, null_value);
909 __ b(eq, &exit); 909 __ b(eq, &exit);
910 910
911 // Convert the object to a JS object. 911 // Convert the object to a JS object.
912 Label convert, done_convert; 912 Label convert, done_convert;
913 __ JumpIfSmi(r0, &convert); 913 __ JumpIfSmi(r0, &convert);
914 __ CompareObjectType(r0, r1, r1, FIRST_JS_OBJECT_TYPE); 914 __ CompareObjectType(r0, r1, r1, FIRST_JS_OBJECT_TYPE);
915 __ b(hs, &done_convert); 915 __ b(hs, &done_convert);
916 __ bind(&convert); 916 __ bind(&convert);
917 __ push(r0); 917 __ push(r0);
918 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_JS); 918 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
919 __ bind(&done_convert); 919 __ bind(&done_convert);
920 __ push(r0); 920 __ push(r0);
921 921
922 // Check cache validity in generated code. This is a fast case for 922 // Check cache validity in generated code. This is a fast case for
923 // the JSObject::IsSimpleEnum cache validity checks. If we cannot 923 // the JSObject::IsSimpleEnum cache validity checks. If we cannot
924 // guarantee cache validity, call the runtime system to check cache 924 // guarantee cache validity, call the runtime system to check cache
925 // validity or get the property names in a fixed array. 925 // validity or get the property names in a fixed array.
926 Label next, call_runtime; 926 Label next, call_runtime;
927 // Preload a couple of values used in the loop. 927 // Preload a couple of values used in the loop.
928 Register empty_fixed_array_value = r6; 928 Register empty_fixed_array_value = r6;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 __ ldr(r1, MemOperand(sp, 4 * kPointerSize)); 1032 __ ldr(r1, MemOperand(sp, 4 * kPointerSize));
1033 __ ldr(r4, FieldMemOperand(r1, HeapObject::kMapOffset)); 1033 __ ldr(r4, FieldMemOperand(r1, HeapObject::kMapOffset));
1034 __ cmp(r4, Operand(r2)); 1034 __ cmp(r4, Operand(r2));
1035 __ b(eq, &update_each); 1035 __ b(eq, &update_each);
1036 1036
1037 // Convert the entry to a string or (smi) 0 if it isn't a property 1037 // Convert the entry to a string or (smi) 0 if it isn't a property
1038 // any more. If the property has been removed while iterating, we 1038 // any more. If the property has been removed while iterating, we
1039 // just skip it. 1039 // just skip it.
1040 __ push(r1); // Enumerable. 1040 __ push(r1); // Enumerable.
1041 __ push(r3); // Current entry. 1041 __ push(r3); // Current entry.
1042 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_JS); 1042 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION);
1043 __ mov(r3, Operand(r0), SetCC); 1043 __ mov(r3, Operand(r0), SetCC);
1044 __ b(eq, loop_statement.continue_target()); 1044 __ b(eq, loop_statement.continue_target());
1045 1045
1046 // Update the 'each' property or variable from the possibly filtered 1046 // Update the 'each' property or variable from the possibly filtered
1047 // entry in register r3. 1047 // entry in register r3.
1048 __ bind(&update_each); 1048 __ bind(&update_each);
1049 __ mov(result_register(), r3); 1049 __ mov(result_register(), r3);
1050 // Perform the assignment as if via '='. 1050 // Perform the assignment as if via '='.
1051 { EffectContext context(this); 1051 { EffectContext context(this);
1052 EmitAssignment(stmt->each(), stmt->AssignmentId()); 1052 EmitAssignment(stmt->each(), stmt->AssignmentId());
(...skipping 2640 matching lines...) Expand 10 before | Expand all | Expand 10 after
3693 if (prop != NULL) { 3693 if (prop != NULL) {
3694 if (prop->is_synthetic()) { 3694 if (prop->is_synthetic()) {
3695 // Result of deleting parameters is false, even when they rewrite 3695 // Result of deleting parameters is false, even when they rewrite
3696 // to accesses on the arguments object. 3696 // to accesses on the arguments object.
3697 context()->Plug(false); 3697 context()->Plug(false);
3698 } else { 3698 } else {
3699 VisitForStackValue(prop->obj()); 3699 VisitForStackValue(prop->obj());
3700 VisitForStackValue(prop->key()); 3700 VisitForStackValue(prop->key());
3701 __ mov(r1, Operand(Smi::FromInt(strict_mode_flag()))); 3701 __ mov(r1, Operand(Smi::FromInt(strict_mode_flag())));
3702 __ push(r1); 3702 __ push(r1);
3703 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); 3703 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3704 context()->Plug(r0); 3704 context()->Plug(r0);
3705 } 3705 }
3706 } else if (var != NULL) { 3706 } else if (var != NULL) {
3707 // Delete of an unqualified identifier is disallowed in strict mode 3707 // Delete of an unqualified identifier is disallowed in strict mode
3708 // but "delete this" is. 3708 // but "delete this" is.
3709 ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this()); 3709 ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this());
3710 if (var->is_global()) { 3710 if (var->is_global()) {
3711 __ ldr(r2, GlobalObjectOperand()); 3711 __ ldr(r2, GlobalObjectOperand());
3712 __ mov(r1, Operand(var->name())); 3712 __ mov(r1, Operand(var->name()));
3713 __ mov(r0, Operand(Smi::FromInt(kNonStrictMode))); 3713 __ mov(r0, Operand(Smi::FromInt(kNonStrictMode)));
3714 __ Push(r2, r1, r0); 3714 __ Push(r2, r1, r0);
3715 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); 3715 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3716 context()->Plug(r0); 3716 context()->Plug(r0);
3717 } else if (var->AsSlot() != NULL && 3717 } else if (var->AsSlot() != NULL &&
3718 var->AsSlot()->type() != Slot::LOOKUP) { 3718 var->AsSlot()->type() != Slot::LOOKUP) {
3719 // Result of deleting non-global, non-dynamic variables is false. 3719 // Result of deleting non-global, non-dynamic variables is false.
3720 // The subexpression does not have side effects. 3720 // The subexpression does not have side effects.
3721 context()->Plug(false); 3721 context()->Plug(false);
3722 } else { 3722 } else {
3723 // Non-global variable. Call the runtime to try to delete from the 3723 // Non-global variable. Call the runtime to try to delete from the
3724 // context where the variable was introduced. 3724 // context where the variable was introduced.
3725 __ push(context_register()); 3725 __ push(context_register());
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
4133 Expression* right = expr->right(); 4133 Expression* right = expr->right();
4134 if (TryLiteralCompare(op, left, right, if_true, if_false, fall_through)) { 4134 if (TryLiteralCompare(op, left, right, if_true, if_false, fall_through)) {
4135 context()->Plug(if_true, if_false); 4135 context()->Plug(if_true, if_false);
4136 return; 4136 return;
4137 } 4137 }
4138 4138
4139 VisitForStackValue(expr->left()); 4139 VisitForStackValue(expr->left());
4140 switch (op) { 4140 switch (op) {
4141 case Token::IN: 4141 case Token::IN:
4142 VisitForStackValue(expr->right()); 4142 VisitForStackValue(expr->right());
4143 __ InvokeBuiltin(Builtins::IN, CALL_JS); 4143 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION);
4144 PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); 4144 PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
4145 __ LoadRoot(ip, Heap::kTrueValueRootIndex); 4145 __ LoadRoot(ip, Heap::kTrueValueRootIndex);
4146 __ cmp(r0, ip); 4146 __ cmp(r0, ip);
4147 Split(eq, if_true, if_false, fall_through); 4147 Split(eq, if_true, if_false, fall_through);
4148 break; 4148 break;
4149 4149
4150 case Token::INSTANCEOF: { 4150 case Token::INSTANCEOF: {
4151 VisitForStackValue(expr->right()); 4151 VisitForStackValue(expr->right());
4152 InstanceofStub stub(InstanceofStub::kNoFlags); 4152 InstanceofStub stub(InstanceofStub::kNoFlags);
4153 __ CallStub(&stub); 4153 __ CallStub(&stub);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
4374 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4374 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4375 __ add(pc, r1, Operand(masm_->CodeObject())); 4375 __ add(pc, r1, Operand(masm_->CodeObject()));
4376 } 4376 }
4377 4377
4378 4378
4379 #undef __ 4379 #undef __
4380 4380
4381 } } // namespace v8::internal 4381 } } // namespace v8::internal
4382 4382
4383 #endif // V8_TARGET_ARCH_ARM 4383 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698