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

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

Issue 151163005: A64: Synchronize with r16356. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/ia32/disasm-ia32.cc ('k') | src/ia32/lithium-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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 // we're running with the --always-opt or the --prepare-always-opt 1261 // we're running with the --always-opt or the --prepare-always-opt
1262 // flag, we need to use the runtime function so that the new function 1262 // flag, we need to use the runtime function so that the new function
1263 // we are creating here gets a chance to have its code optimized and 1263 // we are creating here gets a chance to have its code optimized and
1264 // doesn't just get a copy of the existing unoptimized code. 1264 // doesn't just get a copy of the existing unoptimized code.
1265 if (!FLAG_always_opt && 1265 if (!FLAG_always_opt &&
1266 !FLAG_prepare_always_opt && 1266 !FLAG_prepare_always_opt &&
1267 !pretenure && 1267 !pretenure &&
1268 scope()->is_function_scope() && 1268 scope()->is_function_scope() &&
1269 info->num_literals() == 0) { 1269 info->num_literals() == 0) {
1270 FastNewClosureStub stub(info->language_mode(), info->is_generator()); 1270 FastNewClosureStub stub(info->language_mode(), info->is_generator());
1271 __ push(Immediate(info)); 1271 __ mov(ebx, Immediate(info));
1272 __ CallStub(&stub); 1272 __ CallStub(&stub);
1273 } else { 1273 } else {
1274 __ push(esi); 1274 __ push(esi);
1275 __ push(Immediate(info)); 1275 __ push(Immediate(info));
1276 __ push(Immediate(pretenure 1276 __ push(Immediate(pretenure
1277 ? isolate()->factory()->true_value() 1277 ? isolate()->factory()->true_value()
1278 : isolate()->factory()->false_value())); 1278 : isolate()->factory()->false_value()));
1279 __ CallRuntime(Runtime::kNewClosure, 3); 1279 __ CallRuntime(Runtime::kNewClosure, 3);
1280 } 1280 }
1281 context()->Plug(eax); 1281 context()->Plug(eax);
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 __ mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); 3023 __ mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset));
3024 __ JumpIfSmi(ecx, if_false); 3024 __ JumpIfSmi(ecx, if_false);
3025 __ mov(ecx, FieldOperand(ecx, HeapObject::kMapOffset)); 3025 __ mov(ecx, FieldOperand(ecx, HeapObject::kMapOffset));
3026 __ mov(edx, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 3026 __ mov(edx, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
3027 __ mov(edx, 3027 __ mov(edx,
3028 FieldOperand(edx, GlobalObject::kNativeContextOffset)); 3028 FieldOperand(edx, GlobalObject::kNativeContextOffset));
3029 __ cmp(ecx, 3029 __ cmp(ecx,
3030 ContextOperand(edx, 3030 ContextOperand(edx,
3031 Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); 3031 Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX));
3032 __ j(not_equal, if_false); 3032 __ j(not_equal, if_false);
3033 // Set the bit in the map to indicate that it has been checked safe for
3034 // default valueOf and set true result.
3035 __ or_(FieldOperand(ebx, Map::kBitField2Offset),
3036 Immediate(1 << Map::kStringWrapperSafeForDefaultValueOf));
3037 __ jmp(if_true); 3033 __ jmp(if_true);
3038 3034
3039 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3035 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3040 context()->Plug(if_true, if_false); 3036 context()->Plug(if_true, if_false);
3041 } 3037 }
3042 3038
3043 3039
3044 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { 3040 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) {
3045 ZoneList<Expression*>* args = expr->arguments(); 3041 ZoneList<Expression*>* args = expr->arguments();
3046 ASSERT(args->length() == 1); 3042 ASSERT(args->length() == 1);
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
4894 *stack_depth = 0; 4890 *stack_depth = 0;
4895 *context_length = 0; 4891 *context_length = 0;
4896 return previous_; 4892 return previous_;
4897 } 4893 }
4898 4894
4899 #undef __ 4895 #undef __
4900 4896
4901 } } // namespace v8::internal 4897 } } // namespace v8::internal
4902 4898
4903 #endif // V8_TARGET_ARCH_IA32 4899 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698