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

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

Issue 2038323002: [interpreter] Filter expression positions at source. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0060-source-position-testing
Patch Set: Fix expression positions on StackCheck that this CL broke. Created 4 years, 6 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
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 "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-array-writer.h" 9 #include "src/interpreter/bytecode-array-writer.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 uint32_t operand0); 308 uint32_t operand0);
309 309
310 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode, 310 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode,
311 BytecodeLabel* label); 311 BytecodeLabel* label);
312 312
313 313
314 bool OperandIsValid(Bytecode bytecode, OperandScale operand_scale, 314 bool OperandIsValid(Bytecode bytecode, OperandScale operand_scale,
315 int operand_index, uint32_t operand_value) const; 315 int operand_index, uint32_t operand_value) const;
316 bool RegisterIsValid(Register reg, OperandSize reg_size) const; 316 bool RegisterIsValid(Register reg, OperandSize reg_size) const;
317 317
318 // Test if bytecode needs an expression position to be attached.
319 static bool NeedExpressionPosition(Bytecode bytecode);
Yang 2016/06/08 13:04:54 I wonder whether that should belong in interpreter
oth 2016/06/08 15:04:21 Yes, it could do. The only quirk with this is that
320
318 // Attach latest source position to |node|. 321 // Attach latest source position to |node|.
319 void AttachSourceInfo(BytecodeNode* node); 322 void AttachSourceInfo(BytecodeNode* node);
320 323
321 // Gets a constant pool entry for the |object|. 324 // Gets a constant pool entry for the |object|.
322 size_t GetConstantPoolEntry(Handle<Object> object); 325 size_t GetConstantPoolEntry(Handle<Object> object);
323 326
324 // Not implemented as the illegal bytecode is used inside internally 327 // Not implemented as the illegal bytecode is used inside internally
325 // to indicate a bytecode field is not valid or an error has occured 328 // to indicate a bytecode field is not valid or an error has occured
326 // during bytecode generation. 329 // during bytecode generation.
327 BytecodeArrayBuilder& Illegal(); 330 BytecodeArrayBuilder& Illegal();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 BytecodeSourceInfo latest_source_info_; 362 BytecodeSourceInfo latest_source_info_;
360 363
361 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 364 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
362 }; 365 };
363 366
364 } // namespace interpreter 367 } // namespace interpreter
365 } // namespace internal 368 } // namespace internal
366 } // namespace v8 369 } // namespace v8
367 370
368 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 371 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698