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

Side by Side Diff: src/runtime/runtime-literals.cc

Issue 2041353003: [runtime] Deprecate RUNTIME_ASSERT from primitive ops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed offline comment. Created 4 years, 6 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/runtime/runtime-array.cc ('k') | src/runtime/runtime-maths.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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 HandleScope scope(isolate); 222 HandleScope scope(isolate);
223 DCHECK_EQ(4, args.length()); 223 DCHECK_EQ(4, args.length());
224 CONVERT_ARG_HANDLE_CHECKED(JSFunction, closure, 0); 224 CONVERT_ARG_HANDLE_CHECKED(JSFunction, closure, 0);
225 CONVERT_SMI_ARG_CHECKED(literals_index, 1); 225 CONVERT_SMI_ARG_CHECKED(literals_index, 1);
226 CONVERT_ARG_HANDLE_CHECKED(FixedArray, constant_properties, 2); 226 CONVERT_ARG_HANDLE_CHECKED(FixedArray, constant_properties, 2);
227 CONVERT_SMI_ARG_CHECKED(flags, 3); 227 CONVERT_SMI_ARG_CHECKED(flags, 3);
228 Handle<LiteralsArray> literals(closure->literals(), isolate); 228 Handle<LiteralsArray> literals(closure->literals(), isolate);
229 bool should_have_fast_elements = (flags & ObjectLiteral::kFastElements) != 0; 229 bool should_have_fast_elements = (flags & ObjectLiteral::kFastElements) != 0;
230 bool enable_mementos = (flags & ObjectLiteral::kDisableMementos) == 0; 230 bool enable_mementos = (flags & ObjectLiteral::kDisableMementos) == 0;
231 231
232 RUNTIME_ASSERT(literals_index >= 0 && 232 CHECK(literals_index >= 0);
233 literals_index < literals->literals_count()); 233 CHECK(literals_index < literals->literals_count());
234 234
235 // Check if boilerplate exists. If not, create it first. 235 // Check if boilerplate exists. If not, create it first.
236 Handle<Object> literal_site(literals->literal(literals_index), isolate); 236 Handle<Object> literal_site(literals->literal(literals_index), isolate);
237 Handle<AllocationSite> site; 237 Handle<AllocationSite> site;
238 Handle<JSObject> boilerplate; 238 Handle<JSObject> boilerplate;
239 if (literal_site->IsUndefined(isolate)) { 239 if (literal_site->IsUndefined(isolate)) {
240 Handle<Object> raw_boilerplate; 240 Handle<Object> raw_boilerplate;
241 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 241 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
242 isolate, raw_boilerplate, 242 isolate, raw_boilerplate,
243 CreateObjectLiteralBoilerplate(isolate, literals, constant_properties, 243 CreateObjectLiteralBoilerplate(isolate, literals, constant_properties,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 Handle<LiteralsArray> literals(closure->literals(), isolate); 346 Handle<LiteralsArray> literals(closure->literals(), isolate);
347 RETURN_RESULT_OR_FAILURE( 347 RETURN_RESULT_OR_FAILURE(
348 isolate, 348 isolate,
349 CreateArrayLiteralImpl(isolate, literals, literals_index, elements, 349 CreateArrayLiteralImpl(isolate, literals, literals_index, elements,
350 ArrayLiteral::kShallowElements)); 350 ArrayLiteral::kShallowElements));
351 } 351 }
352 352
353 } // namespace internal 353 } // namespace internal
354 } // namespace v8 354 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | src/runtime/runtime-maths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698