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

Side by Side Diff: src/interpreter/bytecode-array-builder.h

Issue 1422443006: [Intepreter] Don't throw reference errors for globals in typeof. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 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/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-builder.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/ast.h" 10 #include "src/ast.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value); 75 BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value);
76 BytecodeArrayBuilder& LoadLiteral(Handle<Object> object); 76 BytecodeArrayBuilder& LoadLiteral(Handle<Object> object);
77 BytecodeArrayBuilder& LoadUndefined(); 77 BytecodeArrayBuilder& LoadUndefined();
78 BytecodeArrayBuilder& LoadNull(); 78 BytecodeArrayBuilder& LoadNull();
79 BytecodeArrayBuilder& LoadTheHole(); 79 BytecodeArrayBuilder& LoadTheHole();
80 BytecodeArrayBuilder& LoadTrue(); 80 BytecodeArrayBuilder& LoadTrue();
81 BytecodeArrayBuilder& LoadFalse(); 81 BytecodeArrayBuilder& LoadFalse();
82 82
83 // Global loads to the accumulator and stores from the accumulator. 83 // Global loads to the accumulator and stores from the accumulator.
84 BytecodeArrayBuilder& LoadGlobal(size_t name_index, int feedback_slot, 84 BytecodeArrayBuilder& LoadGlobal(size_t name_index, int feedback_slot,
85 LanguageMode language_mode); 85 LanguageMode language_mode,
86 TypeofMode typeof_mode);
86 BytecodeArrayBuilder& StoreGlobal(size_t name_index, int feedback_slot, 87 BytecodeArrayBuilder& StoreGlobal(size_t name_index, int feedback_slot,
87 LanguageMode language_mode); 88 LanguageMode language_mode);
88 89
89 // Load the object at |slot_index| in |context| into the accumulator. 90 // Load the object at |slot_index| in |context| into the accumulator.
90 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index); 91 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index);
91 92
92 // Stores the object in the accumulator into |slot_index| of |context|. 93 // Stores the object in the accumulator into |slot_index| of |context|.
93 BytecodeArrayBuilder& StoreContextSlot(Register context, int slot_index); 94 BytecodeArrayBuilder& StoreContextSlot(Register context, int slot_index);
94 95
95 // Register-accumulator transfers. 96 // Register-accumulator transfers.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Isolate* isolate() const { return isolate_; } 202 Isolate* isolate() const { return isolate_; }
202 203
203 static Bytecode BytecodeForBinaryOperation(Token::Value op); 204 static Bytecode BytecodeForBinaryOperation(Token::Value op);
204 static Bytecode BytecodeForCountOperation(Token::Value op); 205 static Bytecode BytecodeForCountOperation(Token::Value op);
205 static Bytecode BytecodeForCompareOperation(Token::Value op); 206 static Bytecode BytecodeForCompareOperation(Token::Value op);
206 static Bytecode BytecodeForWideOperands(Bytecode bytecode); 207 static Bytecode BytecodeForWideOperands(Bytecode bytecode);
207 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); 208 static Bytecode BytecodeForLoadIC(LanguageMode language_mode);
208 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); 209 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode);
209 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); 210 static Bytecode BytecodeForStoreIC(LanguageMode language_mode);
210 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); 211 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode);
211 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode); 212 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode,
213 TypeofMode typeof_mode);
212 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); 214 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode);
213 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); 215 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type);
214 static Bytecode BytecodeForDelete(LanguageMode language_mode); 216 static Bytecode BytecodeForDelete(LanguageMode language_mode);
215 217
216 static bool FitsInIdx8Operand(int value); 218 static bool FitsInIdx8Operand(int value);
217 static bool FitsInIdx8Operand(size_t value); 219 static bool FitsInIdx8Operand(size_t value);
218 static bool FitsInImm8Operand(int value); 220 static bool FitsInImm8Operand(int value);
219 static bool FitsInIdx16Operand(int value); 221 static bool FitsInIdx16Operand(int value);
220 static bool FitsInIdx16Operand(size_t value); 222 static bool FitsInIdx16Operand(size_t value);
221 223
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 344
343 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 345 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
344 }; 346 };
345 347
346 348
347 } // namespace interpreter 349 } // namespace interpreter
348 } // namespace internal 350 } // namespace internal
349 } // namespace v8 351 } // namespace v8
350 352
351 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 353 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698