Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1003 ASSERT(ast_id != AstNode::kNoNumber); | 1003 ASSERT(ast_id != AstNode::kNoNumber); |
| 1004 int value_count = hydrogen_env->length(); | 1004 int value_count = hydrogen_env->length(); |
| 1005 LEnvironment* result = new LEnvironment(hydrogen_env->closure(), | 1005 LEnvironment* result = new LEnvironment(hydrogen_env->closure(), |
| 1006 ast_id, | 1006 ast_id, |
| 1007 hydrogen_env->parameter_count(), | 1007 hydrogen_env->parameter_count(), |
| 1008 argument_count_, | 1008 argument_count_, |
| 1009 value_count, | 1009 value_count, |
| 1010 outer); | 1010 outer); |
| 1011 int argument_index = 0; | 1011 int argument_index = 0; |
| 1012 for (int i = 0; i < value_count; ++i) { | 1012 for (int i = 0; i < value_count; ++i) { |
| 1013 if (hydrogen_env->is_special_index(i)) continue; | |
| 1014 | |
| 1013 HValue* value = hydrogen_env->values()->at(i); | 1015 HValue* value = hydrogen_env->values()->at(i); |
| 1014 LOperand* op = NULL; | 1016 LOperand* op = NULL; |
| 1015 if (value->IsArgumentsObject()) { | 1017 if (value->IsArgumentsObject()) { |
| 1016 op = NULL; | 1018 op = NULL; |
| 1017 } else if (value->IsPushArgument()) { | 1019 } else if (value->IsPushArgument()) { |
| 1018 op = new LArgument(argument_index++); | 1020 op = new LArgument(argument_index++); |
| 1019 } else { | 1021 } else { |
| 1020 op = UseAny(value); | 1022 op = UseAny(value); |
| 1021 } | 1023 } |
| 1022 result->AddValue(op, value->representation()); | 1024 result->AddValue(op, value->representation()); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1179 } | 1181 } |
| 1180 | 1182 |
| 1181 | 1183 |
| 1182 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { | 1184 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { |
| 1183 ++argument_count_; | 1185 ++argument_count_; |
| 1184 LOperand* argument = UseOrConstant(instr->argument()); | 1186 LOperand* argument = UseOrConstant(instr->argument()); |
| 1185 return new LPushArgument(argument); | 1187 return new LPushArgument(argument); |
| 1186 } | 1188 } |
| 1187 | 1189 |
| 1188 | 1190 |
| 1189 LInstruction* LChunkBuilder::DoContext(HContext* instr) { | 1191 LInstruction* LChunkBuilder::DoContext(HContext* instr) { |
|
fschneider
2011/05/11 10:21:55
Can you omit this instruction if it does not have
| |
| 1190 return DefineAsRegister(new LContext); | 1192 return DefineAsRegister(new LContext); |
| 1191 } | 1193 } |
| 1192 | 1194 |
| 1193 | 1195 |
| 1194 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { | 1196 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { |
| 1195 LOperand* context = UseRegisterAtStart(instr->value()); | 1197 LOperand* context = UseRegisterAtStart(instr->value()); |
| 1196 return DefineAsRegister(new LOuterContext(context)); | 1198 return DefineAsRegister(new LOuterContext(context)); |
| 1197 } | 1199 } |
| 1198 | 1200 |
| 1199 | 1201 |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2141 LOperand* key = UseOrConstantAtStart(instr->key()); | 2143 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2142 LOperand* object = UseOrConstantAtStart(instr->object()); | 2144 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2143 LIn* result = new LIn(key, object); | 2145 LIn* result = new LIn(key, object); |
| 2144 return MarkAsCall(DefineFixed(result, rax), instr); | 2146 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2145 } | 2147 } |
| 2146 | 2148 |
| 2147 | 2149 |
| 2148 } } // namespace v8::internal | 2150 } } // namespace v8::internal |
| 2149 | 2151 |
| 2150 #endif // V8_TARGET_ARCH_X64 | 2152 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |