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

Side by Side Diff: src/factory.cc

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: some misc fixes + update the new v8.gyp too Created 4 years, 7 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 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 } 1653 }
1654 } 1654 }
1655 1655
1656 array->set_elements(*elms); 1656 array->set_elements(*elms);
1657 array->set_length(Smi::FromInt(length)); 1657 array->set_length(Smi::FromInt(length));
1658 } 1658 }
1659 1659
1660 1660
1661 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject( 1661 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject(
1662 Handle<JSFunction> function) { 1662 Handle<JSFunction> function) {
1663 DCHECK(function->shared()->is_generator()); 1663 DCHECK(function->shared()->is_generator() || function->shared()->is_async());
1664 JSFunction::EnsureHasInitialMap(function); 1664 JSFunction::EnsureHasInitialMap(function);
1665 Handle<Map> map(function->initial_map()); 1665 Handle<Map> map(function->initial_map());
1666 DCHECK_EQ(JS_GENERATOR_OBJECT_TYPE, map->instance_type()); 1666 DCHECK_EQ(JS_GENERATOR_OBJECT_TYPE, map->instance_type());
1667 CALL_HEAP_FUNCTION( 1667 CALL_HEAP_FUNCTION(
1668 isolate(), 1668 isolate(),
1669 isolate()->heap()->AllocateJSObjectFromMap(*map), 1669 isolate()->heap()->AllocateJSObjectFromMap(*map),
1670 JSGeneratorObject); 1670 JSGeneratorObject);
1671 } 1671 }
1672 1672
1673 1673
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 } 2371 }
2372 2372
2373 2373
2374 Handle<Object> Factory::ToBoolean(bool value) { 2374 Handle<Object> Factory::ToBoolean(bool value) {
2375 return value ? true_value() : false_value(); 2375 return value ? true_value() : false_value();
2376 } 2376 }
2377 2377
2378 2378
2379 } // namespace internal 2379 } // namespace internal
2380 } // namespace v8 2380 } // namespace v8
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/frames.cc » ('j') | test/mjsunit/mjsunit.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698