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

Side by Side Diff: src/factory.cc

Issue 1675223002: Mark maps having a hidden prototype rather than maps of hidden prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 10 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
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/ia32/builtins-ia32.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/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 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 DCHECK(target_function->IsCallable()); 1949 DCHECK(target_function->IsCallable());
1950 STATIC_ASSERT(Code::kMaxArguments <= FixedArray::kMaxLength); 1950 STATIC_ASSERT(Code::kMaxArguments <= FixedArray::kMaxLength);
1951 if (bound_args.length() >= Code::kMaxArguments) { 1951 if (bound_args.length() >= Code::kMaxArguments) {
1952 THROW_NEW_ERROR(isolate(), 1952 THROW_NEW_ERROR(isolate(),
1953 NewRangeError(MessageTemplate::kTooManyArguments), 1953 NewRangeError(MessageTemplate::kTooManyArguments),
1954 JSBoundFunction); 1954 JSBoundFunction);
1955 } 1955 }
1956 1956
1957 // Determine the prototype of the {target_function}. 1957 // Determine the prototype of the {target_function}.
1958 Handle<Object> prototype; 1958 Handle<Object> prototype;
1959 ASSIGN_RETURN_ON_EXCEPTION(isolate(), prototype, 1959 ASSIGN_RETURN_ON_EXCEPTION(
1960 Object::GetPrototype(isolate(), target_function), 1960 isolate(), prototype,
1961 JSBoundFunction); 1961 JSReceiver::GetPrototype(isolate(), target_function), JSBoundFunction);
1962 1962
1963 // Create the [[BoundArguments]] for the result. 1963 // Create the [[BoundArguments]] for the result.
1964 Handle<FixedArray> bound_arguments; 1964 Handle<FixedArray> bound_arguments;
1965 if (bound_args.length() == 0) { 1965 if (bound_args.length() == 0) {
1966 bound_arguments = empty_fixed_array(); 1966 bound_arguments = empty_fixed_array();
1967 } else { 1967 } else {
1968 bound_arguments = NewFixedArray(bound_args.length()); 1968 bound_arguments = NewFixedArray(bound_args.length());
1969 for (int i = 0; i < bound_args.length(); ++i) { 1969 for (int i = 0; i < bound_args.length(); ++i) {
1970 bound_arguments->set(i, *bound_args[i]); 1970 bound_arguments->set(i, *bound_args[i]);
1971 } 1971 }
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 } 2386 }
2387 2387
2388 2388
2389 Handle<Object> Factory::ToBoolean(bool value) { 2389 Handle<Object> Factory::ToBoolean(bool value) {
2390 return value ? true_value() : false_value(); 2390 return value ? true_value() : false_value();
2391 } 2391 }
2392 2392
2393 2393
2394 } // namespace internal 2394 } // namespace internal
2395 } // namespace v8 2395 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698