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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 477263002: ES6: Add support for method shorthand in object literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/field-index.h" 8 #include "src/field-index.h"
9 #include "src/hydrogen.h" 9 #include "src/hydrogen.h"
10 #include "src/lithium.h" 10 #include "src/lithium.h"
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 HValue* shared_info = GetParameter(0); 1336 HValue* shared_info = GetParameter(0);
1337 1337
1338 AddIncrementCounter(counters->fast_new_closure_total()); 1338 AddIncrementCounter(counters->fast_new_closure_total());
1339 1339
1340 // Create a new closure from the given function info in new space 1340 // Create a new closure from the given function info in new space
1341 HValue* size = Add<HConstant>(JSFunction::kSize); 1341 HValue* size = Add<HConstant>(JSFunction::kSize);
1342 HInstruction* js_function = Add<HAllocate>(size, HType::JSObject(), 1342 HInstruction* js_function = Add<HAllocate>(size, HType::JSObject(),
1343 NOT_TENURED, JS_FUNCTION_TYPE); 1343 NOT_TENURED, JS_FUNCTION_TYPE);
1344 1344
1345 int map_index = Context::FunctionMapIndex(casted_stub()->strict_mode(), 1345 int map_index = Context::FunctionMapIndex(casted_stub()->strict_mode(),
1346 casted_stub()->is_generator()); 1346 casted_stub()->kind());
1347 1347
1348 // Compute the function map in the current native context and set that 1348 // Compute the function map in the current native context and set that
1349 // as the map of the allocated object. 1349 // as the map of the allocated object.
1350 HInstruction* native_context = BuildGetNativeContext(); 1350 HInstruction* native_context = BuildGetNativeContext();
1351 HInstruction* map_slot_value = Add<HLoadNamedField>( 1351 HInstruction* map_slot_value = Add<HLoadNamedField>(
1352 native_context, static_cast<HValue*>(NULL), 1352 native_context, static_cast<HValue*>(NULL),
1353 HObjectAccess::ForContextSlot(map_index)); 1353 HObjectAccess::ForContextSlot(map_index));
1354 Add<HStoreNamedField>(js_function, HObjectAccess::ForMap(), map_slot_value); 1354 Add<HStoreNamedField>(js_function, HObjectAccess::ForMap(), map_slot_value);
1355 1355
1356 // Initialize the rest of the function. 1356 // Initialize the rest of the function.
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 1823
1824 // Probe the stub cache. 1824 // Probe the stub cache.
1825 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 1825 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
1826 Code::ComputeHandlerFlags(Code::LOAD_IC)); 1826 Code::ComputeHandlerFlags(Code::LOAD_IC));
1827 Add<HTailCallThroughMegamorphicCache>(receiver, name, flags); 1827 Add<HTailCallThroughMegamorphicCache>(receiver, name, flags);
1828 1828
1829 // We never continue. 1829 // We never continue.
1830 return graph()->GetConstant0(); 1830 return graph()->GetConstant0();
1831 } 1831 }
1832 } } // namespace v8::internal 1832 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698