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

Side by Side Diff: src/ic/call-optimization.h

Issue 873723005: Load API holder from prototype chain instead embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More fixes Created 5 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
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/call-optimization.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_IC_CALL_OPTIMIZATION_H_ 5 #ifndef V8_IC_CALL_OPTIMIZATION_H_
6 #define V8_IC_CALL_OPTIMIZATION_H_ 6 #define V8_IC_CALL_OPTIMIZATION_H_
7 7
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/ic/access-compiler.h" 9 #include "src/ic/access-compiler.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 20 matching lines...) Expand all
31 return expected_receiver_type_; 31 return expected_receiver_type_;
32 } 32 }
33 33
34 Handle<CallHandlerInfo> api_call_info() const { 34 Handle<CallHandlerInfo> api_call_info() const {
35 DCHECK(is_simple_api_call()); 35 DCHECK(is_simple_api_call());
36 return api_call_info_; 36 return api_call_info_;
37 } 37 }
38 38
39 enum HolderLookup { kHolderNotFound, kHolderIsReceiver, kHolderFound }; 39 enum HolderLookup { kHolderNotFound, kHolderIsReceiver, kHolderFound };
40 Handle<JSObject> LookupHolderOfExpectedType( 40 Handle<JSObject> LookupHolderOfExpectedType(
41 Handle<Map> receiver_map, HolderLookup* holder_lookup) const; 41 Handle<Map> receiver_map, HolderLookup* holder_lookup,
42 int* holder_depth_in_prototype_chain = NULL) const;
42 43
43 // Check if the api holder is between the receiver and the holder. 44 // Check if the api holder is between the receiver and the holder.
44 bool IsCompatibleReceiver(Handle<Object> receiver, 45 bool IsCompatibleReceiver(Handle<Object> receiver,
45 Handle<JSObject> holder) const; 46 Handle<JSObject> holder) const;
46 47
47 private: 48 private:
48 void Initialize(Handle<JSFunction> function); 49 void Initialize(Handle<JSFunction> function);
49 50
50 // Determines whether the given function can be called using the 51 // Determines whether the given function can be called using the
51 // fast api call builtin. 52 // fast api call builtin.
52 void AnalyzePossibleApiFunction(Handle<JSFunction> function); 53 void AnalyzePossibleApiFunction(Handle<JSFunction> function);
53 54
54 Handle<JSFunction> constant_function_; 55 Handle<JSFunction> constant_function_;
55 bool is_simple_api_call_; 56 bool is_simple_api_call_;
56 Handle<FunctionTemplateInfo> expected_receiver_type_; 57 Handle<FunctionTemplateInfo> expected_receiver_type_;
57 Handle<CallHandlerInfo> api_call_info_; 58 Handle<CallHandlerInfo> api_call_info_;
58 }; 59 };
59 } 60 }
60 } // namespace v8::internal 61 } // namespace v8::internal
61 62
62 #endif // V8_IC_CALL_OPTIMIZATION_H_ 63 #endif // V8_IC_CALL_OPTIMIZATION_H_
OLDNEW
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/call-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698