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

Side by Side Diff: src/stub-cache.cc

Issue 19388005: Do not call reinterpret_cast when converting from NULL. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 7 years, 5 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/heap.cc ('k') | no next file » | 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 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 if (FLAG_print_code_stubs) code->Disassemble(name); 1532 if (FLAG_print_code_stubs) code->Disassemble(name);
1533 #endif 1533 #endif
1534 return code; 1534 return code;
1535 } 1535 }
1536 1536
1537 1537
1538 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, 1538 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags,
1539 Handle<Name> name) { 1539 Handle<Name> name) {
1540 return (FLAG_print_code_stubs && !name.is_null() && name->IsString()) 1540 return (FLAG_print_code_stubs && !name.is_null() && name->IsString())
1541 ? GetCodeWithFlags(flags, *Handle<String>::cast(name)->ToCString()) 1541 ? GetCodeWithFlags(flags, *Handle<String>::cast(name)->ToCString())
1542 : GetCodeWithFlags(flags, reinterpret_cast<char*>(NULL)); 1542 : GetCodeWithFlags(flags, NULL);
1543 } 1543 }
1544 1544
1545 1545
1546 void StubCompiler::LookupPostInterceptor(Handle<JSObject> holder, 1546 void StubCompiler::LookupPostInterceptor(Handle<JSObject> holder,
1547 Handle<Name> name, 1547 Handle<Name> name,
1548 LookupResult* lookup) { 1548 LookupResult* lookup) {
1549 holder->LocalLookupRealNamedProperty(*name, lookup); 1549 holder->LocalLookupRealNamedProperty(*name, lookup);
1550 if (lookup->IsFound()) return; 1550 if (lookup->IsFound()) return;
1551 if (holder->GetPrototype()->IsNull()) return; 1551 if (holder->GetPrototype()->IsNull()) return;
1552 holder->GetPrototype()->Lookup(*name, lookup); 1552 holder->GetPrototype()->Lookup(*name, lookup);
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 Handle<FunctionTemplateInfo>( 2193 Handle<FunctionTemplateInfo>(
2194 FunctionTemplateInfo::cast(signature->receiver())); 2194 FunctionTemplateInfo::cast(signature->receiver()));
2195 } 2195 }
2196 } 2196 }
2197 2197
2198 is_simple_api_call_ = true; 2198 is_simple_api_call_ = true;
2199 } 2199 }
2200 2200
2201 2201
2202 } } // namespace v8::internal 2202 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698