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

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

Issue 1520843002: Revert of Removes the Callee parameter from FunctionCallbackInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/cctest/test-api.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 5147 matching lines...) Expand 10 before | Expand all | Expand 10 after
5158 5158
5159 Register callee = edi; 5159 Register callee = edi;
5160 Register call_data = ebx; 5160 Register call_data = ebx;
5161 Register holder = ecx; 5161 Register holder = ecx;
5162 Register api_function_address = edx; 5162 Register api_function_address = edx;
5163 Register context = esi; 5163 Register context = esi;
5164 Register return_address = eax; 5164 Register return_address = eax;
5165 5165
5166 typedef FunctionCallbackArguments FCA; 5166 typedef FunctionCallbackArguments FCA;
5167 5167
5168 STATIC_ASSERT(FCA::kContextSaveIndex == 5); 5168 STATIC_ASSERT(FCA::kContextSaveIndex == 6);
5169 STATIC_ASSERT(FCA::kCalleeIndex == 5);
5169 STATIC_ASSERT(FCA::kDataIndex == 4); 5170 STATIC_ASSERT(FCA::kDataIndex == 4);
5170 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5171 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5171 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5172 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5172 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5173 STATIC_ASSERT(FCA::kIsolateIndex == 1);
5173 STATIC_ASSERT(FCA::kHolderIndex == 0); 5174 STATIC_ASSERT(FCA::kHolderIndex == 0);
5174 STATIC_ASSERT(FCA::kArgsLength == 6); 5175 STATIC_ASSERT(FCA::kArgsLength == 7);
5175 5176
5176 DCHECK(argc.is_immediate() || eax.is(argc.reg())); 5177 DCHECK(argc.is_immediate() || eax.is(argc.reg()));
5177 5178
5178 if (argc.is_immediate()) { 5179 if (argc.is_immediate()) {
5179 __ pop(return_address); 5180 __ pop(return_address);
5180 // context save. 5181 // context save.
5181 __ push(context); 5182 __ push(context);
5182 } else { 5183 } else {
5183 // pop return address and save context 5184 // pop return address and save context
5184 __ xchg(context, Operand(esp, 0)); 5185 __ xchg(context, Operand(esp, 0));
5185 return_address = context; 5186 return_address = context;
5186 } 5187 }
5187 5188
5189 // callee
5190 __ push(callee);
5191
5188 // call data 5192 // call data
5189 __ push(call_data); 5193 __ push(call_data);
5190 5194
5191 Register scratch = call_data; 5195 Register scratch = call_data;
5192 if (!call_data_undefined) { 5196 if (!call_data_undefined) {
5193 // return value 5197 // return value
5194 __ push(Immediate(masm->isolate()->factory()->undefined_value())); 5198 __ push(Immediate(masm->isolate()->factory()->undefined_value()));
5195 // return value default 5199 // return value default
5196 __ push(Immediate(masm->isolate()->factory()->undefined_value())); 5200 __ push(Immediate(masm->isolate()->factory()->undefined_value()));
5197 } else { 5201 } else {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
5332 Operand(ebp, 7 * kPointerSize), NULL); 5336 Operand(ebp, 7 * kPointerSize), NULL);
5333 } 5337 }
5334 5338
5335 5339
5336 #undef __ 5340 #undef __
5337 5341
5338 } // namespace internal 5342 } // namespace internal
5339 } // namespace v8 5343 } // namespace v8
5340 5344
5341 #endif // V8_TARGET_ARCH_X87 5345 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698