summaryrefslogtreecommitdiff
path: root/deps/v8/src/string-stream.cc
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2013-03-18 13:49:34 -0700
committerBen Noordhuis <info@bnoordhuis.nl>2013-03-20 01:11:01 +0100
commit83261e789eb903da39f279cb5a161611482e7df5 (patch)
tree4133b5ca9f53bed4365e1a94544a227d68a0cf12 /deps/v8/src/string-stream.cc
parenta05f973f82d2be8527aad4c371d40d3c7e4c564e (diff)
downloadandroid-node-v8-83261e789eb903da39f279cb5a161611482e7df5.tar.gz
android-node-v8-83261e789eb903da39f279cb5a161611482e7df5.tar.bz2
android-node-v8-83261e789eb903da39f279cb5a161611482e7df5.zip
deps: update v8 to 3.17.13
Diffstat (limited to 'deps/v8/src/string-stream.cc')
-rw-r--r--deps/v8/src/string-stream.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/deps/v8/src/string-stream.cc b/deps/v8/src/string-stream.cc
index 30519b5610..bcc30f9ab3 100644
--- a/deps/v8/src/string-stream.cc
+++ b/deps/v8/src/string-stream.cc
@@ -311,14 +311,14 @@ bool StringStream::Put(String* str) {
bool StringStream::Put(String* str, int start, int end) {
- StringInputBuffer name_buffer(str);
- name_buffer.Seek(start);
- for (int i = start; i < end && name_buffer.has_more(); i++) {
- int c = name_buffer.GetNext();
+ ConsStringIteratorOp op;
+ StringCharacterStream stream(str, &op, start);
+ for (int i = start; i < end && stream.HasMore(); i++) {
+ uint16_t c = stream.GetNext();
if (c >= 127 || c < 32) {
c = '?';
}
- if (!Put(c)) {
+ if (!Put(static_cast<char>(c))) {
return false; // Output was truncated.
}
}
@@ -493,7 +493,7 @@ void StringStream::PrintFunction(Object* f, Object* receiver, Code** code) {
// Common case: on-stack function present and resolved.
PrintPrototype(fun, receiver);
*code = fun->code();
- } else if (f->IsSymbol()) {
+ } else if (f->IsInternalizedString()) {
// Unresolved and megamorphic calls: Instead of the function
// we have the function name on the stack.
PrintName(f);
@@ -533,11 +533,13 @@ void StringStream::PrintFunction(Object* f, Object* receiver, Code** code) {
void StringStream::PrintPrototype(JSFunction* fun, Object* receiver) {
Object* name = fun->shared()->name();
bool print_name = false;
- Heap* heap = HEAP;
- for (Object* p = receiver; p != heap->null_value(); p = p->GetPrototype()) {
+ Isolate* isolate = fun->GetIsolate();
+ for (Object* p = receiver;
+ p != isolate->heap()->null_value();
+ p = p->GetPrototype(isolate)) {
if (p->IsJSObject()) {
Object* key = JSObject::cast(p)->SlowReverseLookup(fun);
- if (key != heap->undefined_value()) {
+ if (key != isolate->heap()->undefined_value()) {
if (!name->IsString() ||
!key->IsString() ||
!String::cast(name)->Equals(String::cast(key))) {