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

Side by Side Diff: src/hydrogen.h

Issue 225823003: Implement handlified String::Equals and Name::Equals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: refactored StringToDouble Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/heap-inl.h ('k') | src/ia32/full-codegen-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 2386
2387 bool IsJSObjectFieldAccessor() { 2387 bool IsJSObjectFieldAccessor() {
2388 int offset; // unused 2388 int offset; // unused
2389 return Accessors::IsJSObjectFieldAccessor<Type>(type_, name_, &offset); 2389 return Accessors::IsJSObjectFieldAccessor<Type>(type_, name_, &offset);
2390 } 2390 }
2391 2391
2392 bool GetJSObjectFieldAccess(HObjectAccess* access) { 2392 bool GetJSObjectFieldAccess(HObjectAccess* access) {
2393 int offset; 2393 int offset;
2394 if (Accessors::IsJSObjectFieldAccessor<Type>(type_, name_, &offset)) { 2394 if (Accessors::IsJSObjectFieldAccessor<Type>(type_, name_, &offset)) {
2395 if (type_->Is(Type::String())) { 2395 if (type_->Is(Type::String())) {
2396 ASSERT(name_->Equals(isolate()->heap()->length_string())); 2396 ASSERT(String::Equals(isolate()->factory()->length_string(), name_));
2397 *access = HObjectAccess::ForStringLength(); 2397 *access = HObjectAccess::ForStringLength();
2398 } else if (type_->Is(Type::Array())) { 2398 } else if (type_->Is(Type::Array())) {
2399 ASSERT(name_->Equals(isolate()->heap()->length_string())); 2399 ASSERT(String::Equals(isolate()->factory()->length_string(), name_));
2400 *access = HObjectAccess::ForArrayLength(map()->elements_kind()); 2400 *access = HObjectAccess::ForArrayLength(map()->elements_kind());
2401 } else { 2401 } else {
2402 *access = HObjectAccess::ForMapAndOffset(map(), offset); 2402 *access = HObjectAccess::ForMapAndOffset(map(), offset);
2403 } 2403 }
2404 return true; 2404 return true;
2405 } 2405 }
2406 return false; 2406 return false;
2407 } 2407 }
2408 2408
2409 bool has_holder() { return !holder_.is_null(); } 2409 bool has_holder() { return !holder_.is_null(); }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 } 2798 }
2799 2799
2800 private: 2800 private:
2801 HGraphBuilder* builder_; 2801 HGraphBuilder* builder_;
2802 }; 2802 };
2803 2803
2804 2804
2805 } } // namespace v8::internal 2805 } } // namespace v8::internal
2806 2806
2807 #endif // V8_HYDROGEN_H_ 2807 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698