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

Side by Side Diff: src/builtins/builtins-string.cc

Issue 2705163005: [csa] Add Unreachable() and use it after throw sites (Closed)
Patch Set: Rebase Created 3 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/builtins/builtins-sharedarraybuffer.cc ('k') | src/builtins/builtins-typedarray.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/builtins/builtins-regexp.h" 5 #include "src/builtins/builtins-regexp.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 #include "src/builtins/builtins.h" 7 #include "src/builtins/builtins.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stub-assembler.h" 9 #include "src/code-stub-assembler.h"
10 #include "src/regexp/regexp-utils.h" 10 #include "src/regexp/regexp-utils.h"
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kValueOffset, 1899 StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kValueOffset,
1900 var_value.value()); 1900 var_value.value());
1901 StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kDoneOffset, 1901 StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kDoneOffset,
1902 var_done.value()); 1902 var_done.value());
1903 Return(result); 1903 Return(result);
1904 } 1904 }
1905 1905
1906 Bind(&throw_bad_receiver); 1906 Bind(&throw_bad_receiver);
1907 { 1907 {
1908 // The {receiver} is not a valid JSGeneratorObject. 1908 // The {receiver} is not a valid JSGeneratorObject.
1909 Node* result = 1909 CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context,
1910 CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context, 1910 HeapConstant(factory()->NewStringFromAsciiChecked(
1911 HeapConstant(factory()->NewStringFromAsciiChecked( 1911 "String Iterator.prototype.next", TENURED)),
1912 "String Iterator.prototype.next", TENURED)), 1912 iterator);
1913 iterator); 1913 Unreachable();
1914 Return(result); // Never reached.
1915 } 1914 }
1916 } 1915 }
1917 1916
1918 namespace { 1917 namespace {
1919 1918
1920 inline bool ToUpperOverflows(uc32 character) { 1919 inline bool ToUpperOverflows(uc32 character) {
1921 // y with umlauts and the micro sign are the only characters that stop 1920 // y with umlauts and the micro sign are the only characters that stop
1922 // fitting into one-byte when converting to uppercase. 1921 // fitting into one-byte when converting to uppercase.
1923 static const uc32 yuml_code = 0xff; 1922 static const uc32 yuml_code = 0xff;
1924 static const uc32 micro_code = 0xb5; 1923 static const uc32 micro_code = 0xb5;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
2102 2101
2103 BUILTIN(StringPrototypeToUpperCase) { 2102 BUILTIN(StringPrototypeToUpperCase) {
2104 HandleScope scope(isolate); 2103 HandleScope scope(isolate);
2105 TO_THIS_STRING(string, "String.prototype.toUpperCase"); 2104 TO_THIS_STRING(string, "String.prototype.toUpperCase");
2106 return ConvertCase(string, isolate, 2105 return ConvertCase(string, isolate,
2107 isolate->runtime_state()->to_upper_mapping()); 2106 isolate->runtime_state()->to_upper_mapping());
2108 } 2107 }
2109 2108
2110 } // namespace internal 2109 } // namespace internal
2111 } // namespace v8 2110 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-sharedarraybuffer.cc ('k') | src/builtins/builtins-typedarray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698