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

Side by Side Diff: src/ic/handler-compiler.h

Issue 2482913002: [ic] Resurrect access checks for primitive and global proxy receivers. (Closed)
Patch Set: Addressing comments Created 4 years, 1 month 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/handler-compiler.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_HANDLER_COMPILER_H_ 5 #ifndef V8_IC_HANDLER_COMPILER_H_
6 #define V8_IC_HANDLER_COMPILER_H_ 6 #define V8_IC_HANDLER_COMPILER_H_
7 7
8 #include "src/ic/access-compiler.h" 8 #include "src/ic/access-compiler.h"
9 #include "src/ic/ic-state.h" 9 #include "src/ic/ic-state.h"
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 Register r1); 76 Register r1);
77 77
78 // Generate code to check that a global property cell is empty. Create 78 // Generate code to check that a global property cell is empty. Create
79 // the property cell at compilation time if no cell exists for the 79 // the property cell at compilation time if no cell exists for the
80 // property. 80 // property.
81 static void GenerateCheckPropertyCell(MacroAssembler* masm, 81 static void GenerateCheckPropertyCell(MacroAssembler* masm,
82 Handle<JSGlobalObject> global, 82 Handle<JSGlobalObject> global,
83 Handle<Name> name, Register scratch, 83 Handle<Name> name, Register scratch,
84 Label* miss); 84 Label* miss);
85 85
86 // Generates check that current native context has the same access rights
87 // as the given |native_context_cell|.
88 // If |compare_native_contexts_only| is true then access check is considered
89 // passed if the execution-time native context is equal to contents of
90 // |native_context_cell|.
91 // If |compare_native_contexts_only| is false then access check is considered
92 // passed if the execution-time native context is equal to contents of
93 // |native_context_cell| or security tokens of both contexts are equal.
94 void GenerateAccessCheck(Handle<WeakCell> native_context_cell,
95 Register scratch1, Register scratch2, Label* miss,
96 bool compare_native_contexts_only);
97
86 // Generates code that verifies that the property holder has not changed 98 // Generates code that verifies that the property holder has not changed
87 // (checking maps of objects in the prototype chain for fast and global 99 // (checking maps of objects in the prototype chain for fast and global
88 // objects or doing negative lookup for slow objects, ensures that the 100 // objects or doing negative lookup for slow objects, ensures that the
89 // property cells for global objects are still empty) and checks that the map 101 // property cells for global objects are still empty) and checks that the map
90 // of the holder has not changed. If necessary the function also generates 102 // of the holder has not changed. If necessary the function also generates
91 // code for security check in case of global object holders. Helps to make 103 // code for security check in case of global object holders. Helps to make
92 // sure that the current IC is still valid. 104 // sure that the current IC is still valid.
93 // 105 //
94 // The scratch and holder registers are always clobbered, but the object 106 // The scratch and holder registers are always clobbered, but the object
95 // register is only clobbered if it the same as the holder register. The 107 // register is only clobbered if it the same as the holder register. The
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 302
291 static Handle<Object> GetKeyedLoadHandler(Handle<Map> receiver_map, 303 static Handle<Object> GetKeyedLoadHandler(Handle<Map> receiver_map,
292 Isolate* isolate); 304 Isolate* isolate);
293 void CompileElementHandlers(MapHandleList* receiver_maps, 305 void CompileElementHandlers(MapHandleList* receiver_maps,
294 List<Handle<Object>>* handlers); 306 List<Handle<Object>>* handlers);
295 }; 307 };
296 } // namespace internal 308 } // namespace internal
297 } // namespace v8 309 } // namespace v8
298 310
299 #endif // V8_IC_HANDLER_COMPILER_H_ 311 #endif // V8_IC_HANDLER_COMPILER_H_
OLDNEW
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698