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

Side by Side Diff: src/factory.cc

Issue 2250863002: WIP: prototype ffi support (from 2084663004) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « src/contexts.h ('k') | src/log.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 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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 DCHECK(!map->IsUndefined(isolate())); 1406 DCHECK(!map->IsUndefined(isolate()));
1407 DCHECK( 1407 DCHECK(
1408 map.is_identical_to(isolate()->sloppy_function_map()) || 1408 map.is_identical_to(isolate()->sloppy_function_map()) ||
1409 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) || 1409 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) ||
1410 map.is_identical_to( 1410 map.is_identical_to(
1411 isolate()->sloppy_function_with_readonly_prototype_map()) || 1411 isolate()->sloppy_function_with_readonly_prototype_map()) ||
1412 map.is_identical_to(isolate()->strict_function_map()) || 1412 map.is_identical_to(isolate()->strict_function_map()) ||
1413 map.is_identical_to(isolate()->strict_function_without_prototype_map()) || 1413 map.is_identical_to(isolate()->strict_function_without_prototype_map()) ||
1414 // TODO(titzer): wasm_function_map() could be undefined here. ugly. 1414 // TODO(titzer): wasm_function_map() could be undefined here. ugly.
1415 (*map == context->get(Context::WASM_FUNCTION_MAP_INDEX)) || 1415 (*map == context->get(Context::WASM_FUNCTION_MAP_INDEX)) ||
1416 (*map == context->get(Context::NATIVE_FUNCTION_MAP_INDEX)) ||
1416 map.is_identical_to(isolate()->proxy_function_map())); 1417 map.is_identical_to(isolate()->proxy_function_map()));
1417 return NewFunction(map, info, context); 1418 return NewFunction(map, info, context);
1418 } 1419 }
1419 1420
1420 1421
1421 Handle<JSFunction> Factory::NewFunction(Handle<String> name) { 1422 Handle<JSFunction> Factory::NewFunction(Handle<String> name) {
1422 return NewFunction( 1423 return NewFunction(
1423 isolate()->sloppy_function_map(), name, MaybeHandle<Code>()); 1424 isolate()->sloppy_function_map(), name, MaybeHandle<Code>());
1424 } 1425 }
1425 1426
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2769 Handle<AccessorInfo> prototype = 2770 Handle<AccessorInfo> prototype =
2770 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); 2771 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs);
2771 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2772 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2772 prototype, rw_attribs); 2773 prototype, rw_attribs);
2773 map->AppendDescriptor(&d); 2774 map->AppendDescriptor(&d);
2774 } 2775 }
2775 } 2776 }
2776 2777
2777 } // namespace internal 2778 } // namespace internal
2778 } // namespace v8 2779 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698