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

Side by Side Diff: src/objects.cc

Issue 2042013003: [builtins] Properly optimize TypedArray/DataView accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 10218 matching lines...) Expand 10 before | Expand all | Expand 10 after
10229 if (description->IsUndefined(isolate)) { 10229 if (description->IsUndefined(isolate)) {
10230 return isolate->factory()->empty_string(); 10230 return isolate->factory()->empty_string();
10231 } 10231 }
10232 IncrementalStringBuilder builder(isolate); 10232 IncrementalStringBuilder builder(isolate);
10233 builder.AppendCharacter('['); 10233 builder.AppendCharacter('[');
10234 builder.AppendString(Handle<String>::cast(description)); 10234 builder.AppendString(Handle<String>::cast(description));
10235 builder.AppendCharacter(']'); 10235 builder.AppendCharacter(']');
10236 return builder.Finish(); 10236 return builder.Finish();
10237 } 10237 }
10238 10238
10239 // static
10240 MaybeHandle<String> Name::ToFunctionName(Handle<Name> name,
10241 Handle<String> prefix) {
10242 Handle<String> name_string;
10243 Isolate* const isolate = name->GetIsolate();
10244 ASSIGN_RETURN_ON_EXCEPTION(isolate, name_string, ToFunctionName(name),
10245 String);
10246 IncrementalStringBuilder builder(isolate);
10247 builder.AppendString(prefix);
10248 builder.AppendCharacter(' ');
10249 builder.AppendString(name_string);
10250 return builder.Finish();
10251 }
10239 10252
10240 namespace { 10253 namespace {
10241 10254
10242 bool AreDigits(const uint8_t* s, int from, int to) { 10255 bool AreDigits(const uint8_t* s, int from, int to) {
10243 for (int i = from; i < to; i++) { 10256 for (int i = from; i < to; i++) {
10244 if (s[i] < '0' || s[i] > '9') return false; 10257 if (s[i] < '0' || s[i] > '9') return false;
10245 } 10258 }
10246 10259
10247 return true; 10260 return true;
10248 } 10261 }
(...skipping 8525 matching lines...) Expand 10 before | Expand all | Expand 10 after
18774 if (cell->value() != *new_value) { 18787 if (cell->value() != *new_value) {
18775 cell->set_value(*new_value); 18788 cell->set_value(*new_value);
18776 Isolate* isolate = cell->GetIsolate(); 18789 Isolate* isolate = cell->GetIsolate();
18777 cell->dependent_code()->DeoptimizeDependentCodeGroup( 18790 cell->dependent_code()->DeoptimizeDependentCodeGroup(
18778 isolate, DependentCode::kPropertyCellChangedGroup); 18791 isolate, DependentCode::kPropertyCellChangedGroup);
18779 } 18792 }
18780 } 18793 }
18781 18794
18782 } // namespace internal 18795 } // namespace internal
18783 } // namespace v8 18796 } // namespace v8
OLDNEW
« src/builtins.cc ('K') | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698