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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 255543003: CodeStubs contain their corresponding Isolate* now. (part 2) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/lithium-codegen-arm.cc ('k') | src/arm/stub-cache-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 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (!Operand(immediate, rmode).is_single_instruction(this, mov_instr)) { 103 if (!Operand(immediate, rmode).is_single_instruction(this, mov_instr)) {
104 size += kInstrSize; 104 size += kInstrSize;
105 } 105 }
106 return size; 106 return size;
107 } 107 }
108 108
109 109
110 int MacroAssembler::CallStubSize( 110 int MacroAssembler::CallStubSize(
111 CodeStub* stub, TypeFeedbackId ast_id, Condition cond) { 111 CodeStub* stub, TypeFeedbackId ast_id, Condition cond) {
112 return CallSize( 112 return CallSize(
113 stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, cond); 113 stub->GetCode(), RelocInfo::CODE_TARGET, ast_id, cond);
Michael Starzinger 2014/04/24 11:48:13 nit: Should fit into one line now.
Sven Panne 2014/04/24 12:02:21 Done.
114 } 114 }
115 115
116 116
117 int MacroAssembler::CallSizeNotPredictableCodeSize( 117 int MacroAssembler::CallSizeNotPredictableCodeSize(
118 Address target, RelocInfo::Mode rmode, Condition cond) { 118 Address target, RelocInfo::Mode rmode, Condition cond) {
119 int size = 2 * kInstrSize; 119 int size = 2 * kInstrSize;
120 Instr mov_instr = cond | MOV | LeaveCC; 120 Instr mov_instr = cond | MOV | LeaveCC;
121 intptr_t immediate = reinterpret_cast<intptr_t>(target); 121 intptr_t immediate = reinterpret_cast<intptr_t>(target);
122 if (!Operand(immediate, rmode).is_single_instruction(NULL, mov_instr)) { 122 if (!Operand(immediate, rmode).is_single_instruction(NULL, mov_instr)) {
123 size += kInstrSize; 123 size += kInstrSize;
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 b(hi, fail); 1335 b(hi, fail);
1336 } 1336 }
1337 1337
1338 1338
1339 #ifdef ENABLE_DEBUGGER_SUPPORT 1339 #ifdef ENABLE_DEBUGGER_SUPPORT
1340 void MacroAssembler::DebugBreak() { 1340 void MacroAssembler::DebugBreak() {
1341 mov(r0, Operand::Zero()); 1341 mov(r0, Operand::Zero());
1342 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate()))); 1342 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate())));
1343 CEntryStub ces(isolate(), 1); 1343 CEntryStub ces(isolate(), 1);
1344 ASSERT(AllowThisStubCall(&ces)); 1344 ASSERT(AllowThisStubCall(&ces));
1345 Call(ces.GetCode(isolate()), RelocInfo::DEBUG_BREAK); 1345 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
1346 } 1346 }
1347 #endif 1347 #endif
1348 1348
1349 1349
1350 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, 1350 void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
1351 int handler_index) { 1351 int handler_index) {
1352 // Adjust this code if not the case. 1352 // Adjust this code if not the case.
1353 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); 1353 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize);
1354 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 1354 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
1355 STATIC_ASSERT(StackHandlerConstants::kCodeOffset == 1 * kPointerSize); 1355 STATIC_ASSERT(StackHandlerConstants::kCodeOffset == 1 * kPointerSize);
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 2313
2314 // All done. 2314 // All done.
2315 bind(&done); 2315 bind(&done);
2316 } 2316 }
2317 2317
2318 2318
2319 void MacroAssembler::CallStub(CodeStub* stub, 2319 void MacroAssembler::CallStub(CodeStub* stub,
2320 TypeFeedbackId ast_id, 2320 TypeFeedbackId ast_id,
2321 Condition cond) { 2321 Condition cond) {
2322 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. 2322 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
2323 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, cond); 2323 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id, cond);
2324 } 2324 }
2325 2325
2326 2326
2327 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { 2327 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
2328 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond); 2328 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
2329 } 2329 }
2330 2330
2331 2331
2332 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 2332 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
2333 return ref0.address() - ref1.address(); 2333 return ref0.address() - ref1.address();
2334 } 2334 }
2335 2335
2336 2336
2337 void MacroAssembler::CallApiFunctionAndReturn( 2337 void MacroAssembler::CallApiFunctionAndReturn(
2338 Register function_address, 2338 Register function_address,
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2720 } 2720 }
2721 2721
2722 2722
2723 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { 2723 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) {
2724 #if defined(__thumb__) 2724 #if defined(__thumb__)
2725 // Thumb mode builtin. 2725 // Thumb mode builtin.
2726 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); 2726 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1);
2727 #endif 2727 #endif
2728 mov(r1, Operand(builtin)); 2728 mov(r1, Operand(builtin));
2729 CEntryStub stub(isolate(), 1); 2729 CEntryStub stub(isolate(), 1);
2730 Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); 2730 Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
2731 } 2731 }
2732 2732
2733 2733
2734 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, 2734 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
2735 InvokeFlag flag, 2735 InvokeFlag flag,
2736 const CallWrapper& call_wrapper) { 2736 const CallWrapper& call_wrapper) {
2737 // You can't call a builtin without a valid frame. 2737 // You can't call a builtin without a valid frame.
2738 ASSERT(flag == JUMP_FUNCTION || has_frame()); 2738 ASSERT(flag == JUMP_FUNCTION || has_frame());
2739 2739
2740 GetBuiltinEntry(r2, id); 2740 GetBuiltinEntry(r2, id);
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
4091 sub(result, result, Operand(dividend)); 4091 sub(result, result, Operand(dividend));
4092 } 4092 }
4093 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); 4093 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift()));
4094 add(result, result, Operand(dividend, LSR, 31)); 4094 add(result, result, Operand(dividend, LSR, 31));
4095 } 4095 }
4096 4096
4097 4097
4098 } } // namespace v8::internal 4098 } } // namespace v8::internal
4099 4099
4100 #endif // V8_TARGET_ARCH_ARM 4100 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698