| OLD | NEW |
| 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 #include "src/compiler/operator-properties.h" | 5 #include "src/compiler/operator-properties.h" |
| 6 | 6 |
| 7 #include "src/compiler/js-operator.h" | 7 #include "src/compiler/js-operator.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 case IrOpcode::kJSCreateScriptContext: | 52 case IrOpcode::kJSCreateScriptContext: |
| 53 case IrOpcode::kJSCreateWithContext: | 53 case IrOpcode::kJSCreateWithContext: |
| 54 | 54 |
| 55 // Conversions | 55 // Conversions |
| 56 case IrOpcode::kJSToObject: | 56 case IrOpcode::kJSToObject: |
| 57 case IrOpcode::kJSToNumber: | 57 case IrOpcode::kJSToNumber: |
| 58 case IrOpcode::kJSToName: | 58 case IrOpcode::kJSToName: |
| 59 | 59 |
| 60 // Misc operations | 60 // Misc operations |
| 61 case IrOpcode::kJSStackCheck: | 61 case IrOpcode::kJSStackCheck: |
| 62 case IrOpcode::kJSDeleteProperty: |
| 63 return 1; |
| 62 | 64 |
| 63 // Properties | 65 // We record the frame state immediately before and immediately after |
| 66 // every property access. |
| 64 case IrOpcode::kJSLoadNamed: | 67 case IrOpcode::kJSLoadNamed: |
| 65 case IrOpcode::kJSStoreNamed: | 68 case IrOpcode::kJSStoreNamed: |
| 66 case IrOpcode::kJSLoadProperty: | 69 case IrOpcode::kJSLoadProperty: |
| 67 case IrOpcode::kJSDeleteProperty: | |
| 68 return 1; | |
| 69 | |
| 70 // StoreProperty provides a second frame state just before | |
| 71 // the operation. This is used to lazy-deoptimize a to-number | |
| 72 // conversion for typed arrays. | |
| 73 case IrOpcode::kJSStoreProperty: | 70 case IrOpcode::kJSStoreProperty: |
| 74 return 2; | 71 return 2; |
| 75 | 72 |
| 76 // Binary operators that can deopt in the middle the operation (e.g., | 73 // Binary operators that can deopt in the middle the operation (e.g., |
| 77 // as a result of lazy deopt in ToNumber conversion) need a second frame | 74 // as a result of lazy deopt in ToNumber conversion) need a second frame |
| 78 // state so that we can resume before the operation. | 75 // state so that we can resume before the operation. |
| 79 case IrOpcode::kJSMultiply: | 76 case IrOpcode::kJSMultiply: |
| 80 case IrOpcode::kJSAdd: | 77 case IrOpcode::kJSAdd: |
| 81 case IrOpcode::kJSBitwiseAnd: | 78 case IrOpcode::kJSBitwiseAnd: |
| 82 case IrOpcode::kJSBitwiseOr: | 79 case IrOpcode::kJSBitwiseOr: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || | 116 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || |
| 120 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || | 117 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || |
| 121 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || | 118 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || |
| 122 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || | 119 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || |
| 123 opcode == IrOpcode::kIfDefault; | 120 opcode == IrOpcode::kIfDefault; |
| 124 } | 121 } |
| 125 | 122 |
| 126 } // namespace compiler | 123 } // namespace compiler |
| 127 } // namespace internal | 124 } // namespace internal |
| 128 } // namespace v8 | 125 } // namespace v8 |
| OLD | NEW |