| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 case IrOpcode::kJSInstanceOf: | 42 case IrOpcode::kJSInstanceOf: |
| 43 | 43 |
| 44 // Object operations | 44 // Object operations |
| 45 case IrOpcode::kJSCreate: | 45 case IrOpcode::kJSCreate: |
| 46 case IrOpcode::kJSCreateArguments: | 46 case IrOpcode::kJSCreateArguments: |
| 47 case IrOpcode::kJSCreateArray: | 47 case IrOpcode::kJSCreateArray: |
| 48 case IrOpcode::kJSCreateLiteralArray: | 48 case IrOpcode::kJSCreateLiteralArray: |
| 49 case IrOpcode::kJSCreateLiteralObject: | 49 case IrOpcode::kJSCreateLiteralObject: |
| 50 case IrOpcode::kJSCreateLiteralRegExp: | 50 case IrOpcode::kJSCreateLiteralRegExp: |
| 51 | 51 |
| 52 // Property access operations |
| 53 case IrOpcode::kJSLoadNamed: |
| 54 case IrOpcode::kJSStoreNamed: |
| 55 case IrOpcode::kJSLoadProperty: |
| 56 case IrOpcode::kJSStoreProperty: |
| 57 case IrOpcode::kJSLoadGlobal: |
| 58 case IrOpcode::kJSStoreGlobal: |
| 59 case IrOpcode::kJSDeleteProperty: |
| 60 |
| 52 // Context operations | 61 // Context operations |
| 53 case IrOpcode::kJSCreateScriptContext: | 62 case IrOpcode::kJSCreateScriptContext: |
| 54 | 63 |
| 55 // Conversions | 64 // Conversions |
| 56 case IrOpcode::kJSToInteger: | 65 case IrOpcode::kJSToInteger: |
| 57 case IrOpcode::kJSToLength: | 66 case IrOpcode::kJSToLength: |
| 58 case IrOpcode::kJSToName: | 67 case IrOpcode::kJSToName: |
| 59 case IrOpcode::kJSToNumber: | 68 case IrOpcode::kJSToNumber: |
| 60 case IrOpcode::kJSToObject: | 69 case IrOpcode::kJSToObject: |
| 61 case IrOpcode::kJSToString: | 70 case IrOpcode::kJSToString: |
| 62 | 71 |
| 63 // Call operations | 72 // Call operations |
| 64 case IrOpcode::kJSCallConstruct: | 73 case IrOpcode::kJSCallConstruct: |
| 65 case IrOpcode::kJSCallFunction: | 74 case IrOpcode::kJSCallFunction: |
| 66 | 75 |
| 67 // Misc operations | 76 // Misc operations |
| 68 case IrOpcode::kJSConvertReceiver: | 77 case IrOpcode::kJSConvertReceiver: |
| 69 case IrOpcode::kJSForInNext: | 78 case IrOpcode::kJSForInNext: |
| 70 case IrOpcode::kJSForInPrepare: | 79 case IrOpcode::kJSForInPrepare: |
| 71 case IrOpcode::kJSStackCheck: | 80 case IrOpcode::kJSStackCheck: |
| 72 case IrOpcode::kJSDeleteProperty: | |
| 73 return 1; | 81 return 1; |
| 74 | 82 |
| 75 // We record the frame state immediately before and immediately after | 83 // We record the frame state immediately before and immediately after |
| 76 // every property or global variable access. | 84 // every property or global variable access. |
| 77 case IrOpcode::kJSLoadNamed: | 85 |
| 78 case IrOpcode::kJSStoreNamed: | |
| 79 case IrOpcode::kJSLoadProperty: | |
| 80 case IrOpcode::kJSStoreProperty: | |
| 81 case IrOpcode::kJSLoadGlobal: | |
| 82 case IrOpcode::kJSStoreGlobal: | |
| 83 return 2; | 86 return 2; |
| 84 | 87 |
| 85 // Binary operators that can deopt in the middle the operation (e.g., | 88 // Binary operators that can deopt in the middle the operation (e.g., |
| 86 // as a result of lazy deopt in ToNumber conversion) need a second frame | 89 // as a result of lazy deopt in ToNumber conversion) need a second frame |
| 87 // state so that we can resume before the operation. | 90 // state so that we can resume before the operation. |
| 88 case IrOpcode::kJSMultiply: | 91 case IrOpcode::kJSMultiply: |
| 89 case IrOpcode::kJSAdd: | 92 case IrOpcode::kJSAdd: |
| 90 case IrOpcode::kJSBitwiseAnd: | 93 case IrOpcode::kJSBitwiseAnd: |
| 91 case IrOpcode::kJSBitwiseOr: | 94 case IrOpcode::kJSBitwiseOr: |
| 92 case IrOpcode::kJSBitwiseXor: | 95 case IrOpcode::kJSBitwiseXor: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || | 141 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || |
| 139 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || | 142 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || |
| 140 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || | 143 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || |
| 141 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || | 144 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || |
| 142 opcode == IrOpcode::kIfDefault; | 145 opcode == IrOpcode::kIfDefault; |
| 143 } | 146 } |
| 144 | 147 |
| 145 } // namespace compiler | 148 } // namespace compiler |
| 146 } // namespace internal | 149 } // namespace internal |
| 147 } // namespace v8 | 150 } // namespace v8 |
| OLD | NEW |